Yes, but there's no output to syslog, I forgot to add logger command at the end of the code:
If cat the out from a file, sed works perfectly, but on this chain of code doesn't
I mean, works until the sed command, but no output on the logger command :-(
Thanks
Hi,
This stems from the following thread https://www.unix.com/showthread.php?t=18299
I have a makefile which makes either executables or a shared library.
i.e. make -f unix.mak will create the executables and
make -f unix.mak libolsv will create the shared library.
Since these have to be... (4 Replies)
I have the following data file.
zz=aa azxc-1234 aa=aa
zz=bb azxc-1234 bb=bb
zz=cc azxc-1234 cc=cc
zz=dd azxc-2345 dd=dd
zz=ee azxc-2345 ee=ee
zz=ff azxc-3456 ff=ff
zz=gg azxc-4567 gg=gg
zz=hh azxc-4567 hh=hh
zz=ii azxc-4567 ii=ii
I want to make 2nd field pattern matching multiple lines... (13 Replies)
I wrote a very simple script that matches combinations of alphabetic characters (1-5). I want to use it to test CPU speeds of different hardware/platforms. The problem is that on multi-core/processor systems, only one CPU is being utilized to execute the script. Is there a way to change that?... (16 Replies)
Dear All,
I have a final output files as
736645|0|
13879|1|
495563|10|
127933|14|
4975|16|
49038|6|
53560|7|
135115|8|
178857|9|
Now I want to replace second column with respective tag as per the value (4 Replies)
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
have a very big file where need to format it like below
example file:
abcd today
is
great
day;
search keyword 'abcd' and append to it all words till we reach ; to make it a single line.
output should look like.
abcd today is great day;
There are many occurrence of such... (2 Replies)
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Hi,
I want to change a file file1.txt:
1234
3456
2345
6789
3456
2333
4444
As, file2.txt in Linux:
'1234','3456','2345','6789','3456','2333','4444'
Could someone please help me. (Single liner sed, awk will be welcome!) (7 Replies)
Hi all,
How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies
LEARN ABOUT SUSE
loggerutils
logger::utils(n) Object Oriented logging facility logger::utils(n)
__________________________________________________________________________________________________________________________________________________NAME
logger::utils - Utilities for logger
SYNOPSIS
package require Tcl 8.4
package require logger::utils ?1.3?
::logger::utils::createFormatCmd formatString
::logger::utils::createLogProc -procName procName ?options...?
::logger::utils::applyAppender -appender appenderType ?options...?
::logger::utils::autoApplyAppender command command-string log op args...
_________________________________________________________________DESCRIPTION
This package adds template based appenders.
::logger::utils::createFormatCmd formatString
This command translates formatString into an expandable command string. The following strings are the known substitutions (from
log4perl) allowed to occur in the formatString:
%c Category of the logging event
%C Fully qualified name of logging event
%d Current date in yyyy/MM/dd hh:mm:ss
%H Hostname
%m Message to be logged
%M Method where logging event was issued
%p Priority of logging event
%P Pid of current process
::logger::utils::createLogProc -procName procName ?options...?
This command ...
-procName procName
The name of the procedure to create.
-conversionPattern pattern
See ::logger::utils::createFormatCmd for the substitutions allowed in the pattern.
-category category
The category (service).
-priority priority
The priority (level).
-outputChannel channel
channel to output on (default stdout)
::logger::utils::applyAppender -appender appenderType ?options...?
This command will create an appender for the specified logger services. If no service is specified then the appender will be added
as the default appender for the specified levels. If no levels are specified, then all levels are assumed.
-service loggerservices
-serviceCmd loggerserviceCmds
Name of the logger instance to modify. -serviceCmd takes as input the return of logger::init.
-appender appenderType
Type of the appender to use. One of console, colorConsole.
-conversionPattern pattern
See ::logger::utils::createFormatCmd for the format of the pattern. If this option is not provided the default pattern
[%d] [%c] [%M] [%p] %m
is used.
-levels levelList
The list of levels to apply this appender to. If not specified all levels are assumed.
Example of usage:
% set log [logger::init testLog]
::logger::tree::testLog
% logger::utils::applyAppender -appender console -serviceCmd $log
% ${log}::error "this is an error"
[2005/08/22 10:14:13] [testLog] [global] [error] this is an error
::logger::utils::autoApplyAppender command command-string log op args...
This command is designed to be added via trace leave to calls of logger::init. It will look at preconfigured state (via ::log-
ger::utils::applyAppender) to autocreate appenders for newly created logger instances. It will return its argument log.
Example of usage:
logger::utils::applyAppender -appender console
set log [logger::init applyAppender-3]
${log}::error "this is an error"
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category logger
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
KEYWORDS
appender, logger
COPYRIGHT
Copyright (c) 2005 Aamer Akhter <aakhter@cisco.com>
log 1.3 logger::utils(n)