Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/slogb.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/slogb.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/slogb.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/slogb.html on line 8
Send a message to the system logger
#include <stdio.h>
#include <sys/slog.h>
int slogb( int code,
int severity,
void * data,
int size );
- opcode
- A combination of a major and minor code.
- severity
- The severity of the log message; see
“Severity levels,”
in the documentation for slogf().
- data
- A block of raw data.
- size
- The size of the raw data.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
|
This function is in libc.a, but not in libc.so
(in order to save space). |
The slog*() functions send log messages to the system logger,
slogger.
To send formatted messages, use
slogf().
If you have programs that scan log files for specified codes,
you can use
slogb()
or
slogi()
to send a block of structures or int's, respectively.
Any value from the Errors section in
MsgSend(),
as well as:
- EACCES
- Insufficient permission to write to the log file.
- EINVAL
- The size of the data buffer exceeds 255×4 bytes, or an odd number of bytes is being read.
- ENOENT
- Invalid log file or directory specified, or slogger isn't running.
See slogf().
QNX Neutrino
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
slogf(),
slogi(),
vslogf()
slogger,
sloginfo
in the Utilities Reference
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/slogb.html on line 181
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/slogb.html on line 181