<commit_before>.\"
.\" Copyright (c) 2012 <NAME> <<EMAIL>>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd May 7, 2013
.Dt PEAK_OUTPUT 3
.Os
.Sh NAME
.Nm output_init ,
.Nm output_log ,
.Nm output_bug ,
.Nm plog ,
.Nm pbug ,
.Nm pout ,
.Nm perr ,
.Nm pbacktrace ,
.Nm panic ,
.Nm alert ,
.Nm critical ,
.Nm error ,
.Nm warning ,
.Nm notice ,
.Nm info ,
.Nm debug
.Nd message output
.Sh SYNOPSIS
.In peak.h
.Fn output_init
.Fn output_log
.Fn output_bug
.Ft void
.Fn plog "int priority" "const char *message" "..."
.Ft void
.Fn pbug "int priority" "const char *message" "..."
.Ft void
.Fn pout "const char *message" "..."
.Ft void
.Fn perr "const char *message" "..."
.Ft void
.Fn pbacktrace "const int skip"
.Fn panic "MESSAGE" "..."
.Fn alert "MESSAGE" "..."
.Fn critical "MESSAGE" "..."
.Fn error "MESSAGE" "..."
.Fn warning "MESSAGE" "..."
.Fn notice "MESSAGE" "..."
.Fn info "MESSAGE" "..."
.Fn debug "MESSAGE" "..."
.Sh DESCRIPTION
The usage of the
.Xr printf 3
family of functions is generally discuraged when using this library.
Instead, the functions and macros presented hereby are meant as a
replacement to be used throughout the reader's code.
.Pp
The
.Fn output_init
macro initialises two global variables, which keep track of the maximum
output levels used for the process, to the lowest available level.
The level style is that of
.Xr syslog 3
and the currently selected level is increased by one each time
.Fn output_log
(log level) or
.Fn output_bug
(debug level) is called.
.Pp
The
.Fn plog<commit_msg>output: no need to quote single word arguments<commit_after>.\"
.\" Copyright (c) 2012 <NAME> <<EMAIL>>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd May 7, 2013
.Dt PEAK_OUTPUT 3
.Os
.Sh NAME
.Nm output_init ,
.Nm output_log ,
.Nm output_bug ,
.Nm plog ,
.Nm pbug ,
.Nm pout ,
.Nm perr ,
.Nm pbacktrace ,
.Nm panic ,
.Nm alert ,
.Nm critical ,
.Nm error ,
.Nm warning ,
.Nm notice ,
.Nm info ,
.Nm debug
.Nd message output
.Sh SYNOPSIS
.In peak.h
.Fn output_init
.Fn output_log
.Fn output_bug
.Ft void
.Fn plog "int priority" "const char *message" ...
.Ft void
.Fn pbug "int priority" "const char *message" ...
.Ft void
.Fn pout "const char *message" ...
.Ft void
.Fn perr "const char *message" ...
.Ft void
.Fn pbacktrace "const int skip"
.Fn panic MESSAGE ...
.Fn alert MESSAGE ...
.Fn critical MESSAGE ...
.Fn error MESSAGE ...
.Fn warning MESSAGE ...
.Fn notice MESSAGE ...
.Fn info MESSAGE ...
.Fn debug MESSAGE ...
.Sh DESCRIPTION
The usage of the
.Xr printf 3
family of functions is generally discuraged when using this library.
Instead, the functions and macros presented hereby are meant as a
replacement to be used throughout the reader's code.
.Pp
The
.Fn output_init
macro initialises two global variables, which keep track of the maximum
output levels used for the process, to the lowest available level.
The level style is that of
.Xr syslog 3
and the currently selected level is increased by one each time
.Fn output_log
(log level) or
.Fn output_bug
(debug level) is called.
.Pp
The
.Fn plog
{'fraction_non_alphanumeric': 0.10318356288101152, 'fraction_numerical': 0.005418830435764281, 'mean_word_length': 3.386138613861386, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1266628', 'n_tokens_mistral': 1469, 'n_tokens_neox': 1358, 'n_words': 674}