Sponsored Content
Operating Systems Linux Ubuntu Date format in the files written by syslogd Post 302756311 by RudiC on Tuesday 15th of January 2013 03:11:05 PM
Old 01-15-2013
I was proposing to just comment out this line temporarily for a test/compare:
Quote:
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

convert mmddyy date format to ccyyddd format??

hi, for reading a cobol indexed file i need to convert "mmddyy" date format to "ccyyddd" format. i checked the datecalc and other scripts but couldnt modify them to cater to my need:(... The datecalc gives an output which i believe is the total days till that date, but i want to convert it... (2 Replies)
Discussion started by: Bhups
2 Replies

2. Solaris

rotating the syslogd and messages files

Im about to install a sunfreeware program called logrotate which does exactly what it says on the tin....just a quick question ..if its going to rename messages to messages.0 etc do I need to issue a HUP to syslogd after doing this or will the new messages file get created automatically cheers (2 Replies)
Discussion started by: hcclnoodles
2 Replies

3. Shell Programming and Scripting

convert date format to mysql date format in log file

I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column. I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this? Sample input 02/27/09,23:52:31 02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies

4. UNIX for Dummies Questions & Answers

Changing from Excel date format to MySQL date format

I have a list of dates in the following format: mm/dd/yyyy and want to change these to the MySQL standard format: yyyy-mm-dd. The dates in the original file may or may not be zero padded, so April is sometimes "04" and other times simply "4". This is what I use to change the format: sed -i '' -e... (2 Replies)
Discussion started by: figaro
2 Replies

5. Shell Programming and Scripting

Finding files before a certain date with predefined format

Guys, I have an input file such as below I would like to know how i would be able to find items created before 2011-10-01 Appreciate any expert advice. Thanks. (3 Replies)
Discussion started by: aismann
3 Replies

6. Shell Programming and Scripting

Monitor log entries in log files with no Date format? - Efficient logcheck?

is there a way to efficiently monitor logfiles that do not have a date or time format? i have several logs on several different servers that need to be monitored. but i realized writing a script for this would be very complex and time consuming giving the variety of things i need to check for i.e.... (2 Replies)
Discussion started by: SkySmart
2 Replies

7. UNIX for Dummies Questions & Answers

Rename all Files in a UNIX Directory from one date format to another date format

Hi Unix Gurus, I would like to rename several files in a Unix Directory . The filenames can have more than 1 underscore ( _ ) and the last underscore is always followed by a date in the format mmddyyyy. The Extension of the files can be .txt or .pdf or .xls etc and is case insensitive ie... (1 Reply)
Discussion started by: pchegoor
1 Replies

8. Shell Programming and Scripting

To find files having filename containing specific date format

Hi, I have a requirement to create a shell script(tcsh) that finds all the files in a directory having the file name containing date format "YYYYMMDDHHMM" and extract the date time part ""YYYYMMDDHHMM" for further processing. Could you please have any idea on this. trades_201604040000.out... (6 Replies)
Discussion started by: gopal.biswal
6 Replies

9. Shell Programming and Scripting

Change date format in am/pm in csv files using UNIX

Hi All, I'm new to forum good to hear all. I stuck in converting date format in csv file using unix csv file contains as below ,750,0000000000000000GCJR, ,06/22/2016 14:48:44 I want to convert into as below ,750,0000000000000000GCJR, ,06/22/2016 02:48:44 PM Please reply asap..... (22 Replies)
Discussion started by: Raghureds
22 Replies

10. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

i try to set linux date & time in specific format but it keep giving me error Example : date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" or date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" keep giving me this error : date: invalid date ‘19-01-2017 00:05:01' Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies
logger(1)						      General Commands Manual							 logger(1)

NAME
logger - Makes entries in the system log SYNOPSIS
/usr/bin/logger [-f file] [-i] [-p[facility.]priority] [-t tag] [message...] logger [-b] [message...] STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: logger: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
[Tru64 UNIX] Logs the informational message to the binary event logger instead of the syslog() subroutine and enters information in the binary event log file. The uerf command with the -r 250 option reports the informational messages that are in the binary event log file, which is used for system maintenance and troubleshooting. The -b option cannot be used with any other options. [Tru64 UNIX] Logs all lines in file. [Tru64 UNIX] Logs the process ID (PID) of the logger process with each line. [Tru64 UNIX] Enters the message with the specified priority and, if specified, from the specified facility. [Tru64 UNIX] You can specify priority as either an alphabetic string or its integer equivalent. You can specify the following val- ues for the priority variable: [Tru64 UNIX] (0) [Tru64 UNIX] The system is unusable. (0) [Tru64 UNIX] Action must be taken imme- diately. (1) [Tru64 UNIX] Critical conditions. (2) [Tru64 UNIX] Error conditions. (3) [Tru64 UNIX] (3) [Tru64 UNIX] (4) [Tru64 UNIX] Warning conditions. (4) [Tru64 UNIX] Normal but significant condition. (5) [Tru64 UNIX] Informational. (6) [Tru64 UNIX] Debug-level messages. (7) [Tru64 UNIX] You can also specify a value for the facility variable, which indicates the source of the event. You can specify facility as either an alphabetic string or its integer equivalent. The integer values appear in parentheses. You can specify the following values for the facility variable: [Tru64 UNIX] Kernel messages. (0) [Tru64 UNIX] Random user-level messages. (8) [Tru64 UNIX] Mail system. (16) [Tru64 UNIX] System daemons. (24) [Tru64 UNIX] Security/authorization messages. (32) [Tru64 UNIX] (32) [Tru64 UNIX] Messages syslogd generates internally. (40) [Tru64 UNIX] Line printer subsystem. (48) [Tru64 UNIX] Network news subsystem. (56) [Tru64 UNIX] UUCP subsystem. (64) [Tru64 UNIX] Clock daemon. (72) [Tru64 UNIX] (128) [Tru64 UNIX] (136) [Tru64 UNIX] (144) [Tru64 UNIX] (152) [Tru64 UNIX] (160) [Tru64 UNIX] (168) [Tru64 UNIX] (176) [Tru64 UNIX] (184) [Tru64 UNIX] Precedes each entry in the log with tag. OPERANDS
You can specify the message to be used for entries on the command line or with the -f file option, which specifies that each line in file be logged as an entry. If you do not specify message or -f, logger reads standard input. DESCRIPTION
The logger command makes the specified entries in the system log file. The logger command provides a program and shell script interface to the syslog() subroutine. The file in which entries are made depends on the current system log configuration; see syslog and syslogd for more information. NOTES
The effects of the environment variable LC_MESSAGES apply only to diagnostic messages generated by logger, and not to any messages written by the use of the command. EXIT STATUS
The following exit values are returned: Successful completion. An error occurred. EXAMPLES
To log the system reboot, including the process ID of the process running logger, enter: logger -i System rebooted To log each line in the file build.events with the tag trial build preceding them, enter: logger -f build.events -t "trial build" The following commands are equiv- alent and enter events of warning priority to the log: logger -p warning logger -p 4 The following commands are equivalent and enter events from the daemon facility of warning priority: logger -p daemon.warning logger -p 24.4 To specify the debug priority with a priority name, enter: logger -p debug my message To specify the debug priority with a priority number, enter: logger -p 7 my message To specify both debug priority and the user facility, enter: logger -p user.debug my message To specify the same facility/priority pair using numeric values, enter: logger -p 8.7 my message You can also combine alphabetic and numeric specifications: logger -p user.7 my message logger -p 8.debug my message ENVIRONMENT VARIABLES
The following environment variables affect the execution of logger: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization variables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments). Determines the locale for the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: binlogd(8), syslogd(8), uerf(8) Functions: syslog(3) Standards: standards(5) logger(1)
All times are GMT -4. The time now is 12:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy