Its not this kind of log. Its a plain file created by a program. There is nothing in the syslog.
If you have the logger program installed you could write a small script reading the log file, creating syslog messages out of it and then truncate the log file accordingly. If the program is creating the logfile by redirectio you could even use a pipe and forego the logfile completely:
logger is part of many Linux distributions and is used to create syslog messages from the commandline.
Hello,
i need some help/advice on how to solve a particular problem.
these are the users:
|name | group |
---------- ---------------
|boss | department1 |
|assistant | department1 |
|employee | department1 |
|spy | department2 |
this is the... (0 Replies)
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
I am out of idea what to do to resolve the problem!
I need to use the open(file, for.., access) function to write a file.
Never have the situation like that: it is return 0 - zero.
As a result all write(..) going to the screen!
What the problem it could be?
I do not even know... (2 Replies)
Hi All,
I am having an XML tag like:
<detail sim_ser_no_1="898407109001000090"
imsi_1="452070001000090">
<security>ADM1=????</security>
<security>PIN1=????</security>
<security>PIN2=????</security>
... (2 Replies)
On our home network, with 2 Macbook pros running OS X 10.6.*, I would like be able to popup a message to the user of the other computer.
Is there a way I can "call" from one computer to another not using skype, or ichat or any application that the user has to have running?
I guess first I... (8 Replies)
Hi Friends,
I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving...
File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
I have file which contains a huge amount of data. I need to search the pattern Message id. When that pattern is matched I need to get abcdeff0-1g6g-91g3-1z2z-2mm605m90000 to another file.
Kindly provide your input.
File is like below
Jan 11 04:05:10 linux100 |NOTICE... (2 Replies)
Hi,
I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file.
File1 - file2 = file3
wc -l file1.txt
58112
wc -l file2.txt
55260
head -5 file1.txt
101214200123
101214700300
101250030067
101214100500... (10 Replies)
Hi Everyone,
I want your help to write a script which will take text file as input and on the basis of delimiter ":"script will create excel sheet.
Example input:
IpAdress:InstanceName:Port:ServerName
10.255.255.1:abc:2232:xyz_abc
Output should be an excel sheet like below:
Column... (8 Replies)
Hello Team-
we would like to implement an approach which has to write the log file simultaneously
when .sql file is executing by Unix process. At present,it is writing the log file
once the process is completed. I've tested the current process with the below
approaches and none of them... (1 Reply)
Discussion started by: Hima_B
1 Replies
LEARN ABOUT PHP
openlog
OPENLOG(3) 1 OPENLOG(3)openlog - Open connection to system loggerSYNOPSIS
bool openlog (string $ident, int $option, int $facility)
DESCRIPTION openlog(3) opens a connection to the system logger for a program.
The use of openlog(3) is optional. It will automatically be called by syslog(3) if necessary, in which case $ident will default to FALSE.
PARAMETERS
o $ident
- The string $ident is added to each message.
o $option
- The $option argument is used to indicate what logging options will be used when generating a log message.
openlog(3) Options
+-----------+---------------------------------------------------+
| Constant | |
| | |
| | Description |
| | |
+-----------+---------------------------------------------------+
| | |
| LOG_CONS | |
| | |
| | if there is an error while sending data to the |
| | system logger, write directly to the system con- |
| | sole |
| | |
| | |
|LOG_NDELAY | |
| | |
| | open the connection to the logger immediately |
| | |
| | |
|LOG_ODELAY | |
| | |
| | (default) delay opening the connection until the |
| | first message is logged |
| | |
| | |
|LOG_PERROR | |
| | |
| | print log message also to standard error |
| | |
| | |
| LOG_PID | |
| | |
| | include PID with each message |
| | |
+-----------+---------------------------------------------------+
You can use one or more of this options. When using multiple options you need to OR them, i.e. to open the connection immediately,
write to the console and include the PID in each message, you will use: LOG_CONS | LOG_NDELAY | LOG_PID
o $facility
- The $facility argument is used to specify what type of program is logging the message. This allows you to specify (in your
machine's syslog configuration) how messages coming from different facilities will be handled.
openlog(3) Facilities
+---------------------------+---------------------------------------------------+
| Constant | |
| | |
| | Description |
| | |
+---------------------------+---------------------------------------------------+
| | |
| LOG_AUTH | |
| | |
| | security/authorization messages (use LOG_AUTH- |
| | PRIV instead in systems where that constant is |
| | defined) |
| | |
| | |
| LOG_AUTHPRIV | |
| | |
| | security/authorization messages (private) |
| | |
| | |
| LOG_CRON | |
| | |
| | clock daemon (cron and at) |
| | |
| | |
| LOG_DAEMON | |
| | |
| | other system daemons |
| | |
| | |
| LOG_KERN | |
| | |
| | kernel messages |
| | |
| | |
|LOG_LOCAL0 ... LOG_LOCAL7 | |
| | |
| | reserved for local use, these are not available |
| | in Windows |
| | |
| | |
| LOG_LPR | |
| | |
| | line printer subsystem |
| | |
| | |
| LOG_MAIL | |
| | |
| | mail subsystem |
| | |
| | |
| LOG_NEWS | |
| | |
| | USENET news subsystem |
| | |
| | |
| LOG_SYSLOG | |
| | |
| | messages generated internally by syslogd |
| | |
| | |
| LOG_USER | |
| | |
| | generic user-level messages |
| | |
| | |
| LOG_UUCP | |
| | |
| | UUCP subsystem |
| | |
+---------------------------+---------------------------------------------------+
Note
LOG_USER is the only valid log type under Windows operating systems
RETURN VALUES
Returns TRUE on success or FALSE on failure.
SEE ALSO syslog(3), closelog(3).
PHP Documentation Group OPENLOG(3)