Sponsored Content
Operating Systems Linux Red Hat Syslog.conf: looking for a simple answer on a simple question Post 302826827 by MadeInGermany on Thursday 27th of June 2013 11:33:42 AM
Old 06-27-2013
I think all vendors define all severe types. This is the minimum level, e.g. err includes crit.
You can test with the logger command
Code:
logger -p user.crit 'this is user.crit'

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple Question

Can anyone tell me if there is a way to remove the encryption from Data CDs by UNIX? Or does anyone know of a program that can remove the encryption? I would much appreciate it! Thanks, -Peaves (2 Replies)
Discussion started by: Peaves
2 Replies

2. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies

3. Programming

Simple C question... Hopefully it's simple

Hello. I'm a complete newbie to C programming. I have a C program that wasn't written by me where I need to write some wrappers around it to automate and make it easier for a client to use. The problem is that the program accepts standard input to control the program... I'm hoping to find a simple... (6 Replies)
Discussion started by: Xeed
6 Replies

4. Solaris

Solaris JumpStarting?... Simple Yes/No Question... Unless the answer's 'No'

I'm reading through this guide, BigAdmin Feature Article: Using Solaris JumpStart With the Solaris 10 OS for x86/x64 Platforms, and I was wondering if there was more to the bash scripts than just the example given (see above link) like for begin1 and begin2 and finish1 and finish2. I don't know... (3 Replies)
Discussion started by: Bradj47
3 Replies

5. Shell Programming and Scripting

Simple if then else question

I am having trouble making this statement work. I am passing in a number value for the number of days to keep archive logs for and wanted to make sure that it is a number. I have a script that will return 1 for is a number and 0 for is not a number. I also want to make sure that the number is not... (2 Replies)
Discussion started by: gandolf989
2 Replies

6. UNIX for Dummies Questions & Answers

TAR question (probably a very simple answer)

Hi All, I have a (probably) very simple tar question on a Solaris box that I'm a little embarrassed to ask. After repeatedly checking man tar and searching for solutions online (I'm not sure of the correct "keywords" to look for) The question is: If I were to use the command:tar cf... (4 Replies)
Discussion started by: chatguy
4 Replies

7. UNIX for Dummies Questions & Answers

simple(?) if/else question

Hello, I have a quick question that is not related to homework in any way shape or form (in case anyone wanted to know). My question is thus: I have a file "temp" that has the two values say "5" and "3" (separated by a white space). Now, I want to simply write an if-else statement that reads... (10 Replies)
Discussion started by: astropi
10 Replies

8. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

9. Shell Programming and Scripting

Very simple question

Hi, guys, I'm a new comer here. I'm studying Unix Shell and I met a problem confusing me a lot. Here it is : script 1: #!/bin/sh # scriptname : do_increment increment(){ sum=`expr $1 + 1` return $sum # Return the value of sum to the script. } echo -n "The sum is " increment $1 # Call... (2 Replies)
Discussion started by: franksunnn
2 Replies

10. Shell Programming and Scripting

Simple question

Sorry for stupid question, but why this script gives that output? $ awk 'BEGIN { well=56789; print 1234$well }' 1234 I expected 123456789 (9 Replies)
Discussion started by: silyin
9 Replies
LOG(1)							User Contributed Perl Documentation						    LOG(1)

NAME
Apache::Log -- Perl API for Apache Logging Methods Synopsis #in startup.pl #------------- use Apache::Log; my $s = Apache->server; $s->log_error("server: log_error"); $s->log_serror(Apache::LOG_MARK, Apache::LOG_ERR, 0, "log_serror logging at err level"); $s->log_serror(Apache::LOG_MARK, Apache::LOG_DEBUG, APR::ENOTIME, "debug print"); Apache::Server->log_error("routine warning"); Apache->warn("routine warning"); Apache::warn("routine warning"); Apache::Server->warn("routine warning"); #in a handler #------------ use Apache::Log; sub handler{ my $r = shift; $r->log_error("request: log_error"); $r->warn("whoah!"); my $rlog = $r->log; for my $level qw(emerg alert crit error warn notice info debug) { no strict 'refs'; $rlog->$level($package, "request: $level log level"); } # can use server methods as well my $s = $r->server; $s->log_error("server: log_error"); $r->log_rerror(Apache::LOG_MARK, Apache::LOG_DEBUG, APR::ENOTIME, "in debug"); $s->log_serror(Apache::LOG_MARK, Apache::LOG_INFO, 0, "server info"); $s->log_serror(Apache::LOG_MARK, Apache::LOG_ERR, APR::ENOTIME, "fatal error"); $s->warn('routine server warning'); } Description "Apache::Log" provides the Perl API for Apache logging methods. Constants The following constants (sorted from the most severe level to the least severe) are used in logging methods to specify the log level at which the message should be logged: o "Apache::LOG_EMERG" o "Apache::LOG_ALERT" o "Apache::LOG_CRIT" o "Apache::LOG_ERR" o "Apache::LOG_WARNING" o "Apache::LOG_NOTICE" o "Apache::LOG_INFO" o "Apache::LOG_DEBUG" For example if the current "LogLevel" is set to warning, only messages with log level of the level warning or higher (err, crit, elert and emerg) will be logged. Therefore this: $r->log_rerror(Apache::LOG_MARK, Apache::LOG_WARNING, APR::ENOTIME, "warning!"); will log the message, but this one won't: $r->log_rerror(Apache::LOG_MARK, Apache::LOG_INFO, APR::ENOTIME, "just an info"); It will be logged only if the server log level is set to info or debug. (either in the configuration file or using the "$s->loglevel()" method.) Other constants: o "Apache::LOG_LEVELMASK" used to mask off the level value, to make sure that the log level's value is within the proper bits range. e.g.: $loglevel &= LOG_LEVELMASK; o "Apache::LOG_TOCLIENT" used to give content handlers the option of including the error text in the "ErrorDocument" sent back to the client. When "Apache::LOG_TOCLIENT" is passed to "log_rerror()" the error message will be saved in the $r's notes table, keyed to the string "error-notes", if and only if the severity level of the message is "Apache::LOG_WARNING" or greater and there are no other "error-notes" entry already set in the request record's notes table. Once the "error-notes" entry is set, it is up to the error handler to determine whether this text should be sent back to the client. For example: $r->log_rerror(Apache::LOG_MARK, Apache::LOG_ERR|Apache::LOG_TOCLIENT, APR::ENOTIME, "request log_rerror"); now the log message can be retrieved via: $r->notes->get("error-notes"); Remember that client generated text streams sent back to the client MUST be escaped to prevent CSS attacks. o "Apache::LOG_STARTUP" is set only during the startup. Server Logging Methods "$s->log_error()" $s->log_error(@message); just logs the supplied message. For example: $s->log_error("running low on memory"); "$s->log_serror()" log_serror($file, $line, $level, $status, @message); where: * $file The file in which this function is called * $line The line number on which this function is called * $level The level of this error message * $status The status code from the previous command * @message The log message This function provides a fine control of when the message is logged, gives an access to built-in status codes. For example: $s->log_serror(Apache::LOG_MARK, Apache::LOG_ERR, 0, "log_serror logging at err level"); $s->log_serror(Apache::LOG_MARK, Apache::LOG_DEBUG, APR::ENOTIME, "debug print"); "$s->log()" my $slog = $s->log; returns a handle which can be used to log messages of different level. See the next entry. emerg(), alert(), crit(), error(), warn(), notice(), info(), debug() $s->log->emerg(@message); after getting the log handle with "$s->log", use these methods to control when messages should be logged. For example: my $slog = $s->log; $slog->debug("just ", "some debug info"); $slog->warn(@warnings); $slog->crit("dying"); Request Logging Methods "$r->log_error()" $r->log_error(@message); logs the supplied message (similar to "$s->log_error"). For example: $r->log_error("the request is about to end"); the same as "$s->log_error". "$r->log_rerror()" log_rerror($file, $line, $level, $status, @message); same as "$s->log_rerror". For example: $s->log_rerror(Apache::LOG_MARK, Apache::LOG_ERR, 0, "log_rerror logging at err level"); $s->log_rerror(Apache::LOG_MARK, Apache::LOG_DEBUG, APR::ENOTIME, "debug print"); "$r->log()" my $rlog = $r->log; Similar to "$s->log()" the emerg(), alert(), crit(), error(), warn(), notice(), info(), debug() methods Similar to the server's log functions with the same names. For example: $rlog->debug("just ", "some debug info"); $rlog->warn(@req_warnings); $rlog->crit("dying"); General Functions "Apache::LOG_MARK()" my($file, $line) = Apache::LOG_MARK(); Though looking like a constant, this is a function, which returns a list of two items: "(__FILE__, __LINE__)", i.e. the file and the line where the function was called from. Aliases "$s->warn()" $s->warn(@warnings); is the same as: $s->log_error(Apache::LOG_MARK, Apache::LOG_WARNING, 0, @warnings) For example: $s->warn('routine server warning'); "Apache->warn()" "Apache::warn()" Apache->warn(@warnings); perl v5.8.0 2002-08-14 LOG(1)
All times are GMT -4. The time now is 09:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy