Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
979b7d92
Commit
979b7d92
authored
17 years ago
by
Ruud Overeem
Browse files
Options
Downloads
Patches
Plain Diff
BugID: 1000
TestProgram for Loggingprocessor.
parent
187c896b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MAC/APL/CURTDBDaemons/test/tLoggingProcessor.cc
+83
-0
83 additions, 0 deletions
MAC/APL/CURTDBDaemons/test/tLoggingProcessor.cc
MAC/APL/CURTDBDaemons/test/tLoggingProcessor.log_prop
+18
-0
18 additions, 0 deletions
MAC/APL/CURTDBDaemons/test/tLoggingProcessor.log_prop
with
101 additions
and
0 deletions
MAC/APL/CURTDBDaemons/test/tLoggingProcessor.cc
0 → 100644
+
83
−
0
View file @
979b7d92
//# tLoggingProcessor.cc: one_line_description
//#
//# Copyright (C) 2002-2004
//# ASTRON (Netherlands Foundation for Research in Astronomy)
//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
//#
//# This program is free software; you can redistribute it and/or modify
//# it under the terms of the GNU General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or
//# (at your option) any later version.
//#
//# This program is distributed in the hope that it will be useful,
//# but WITHOUT ANY WARRANTY; without even the implied warranty of
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//# GNU General Public License for more details.
//#
//# You should have received a copy of the GNU General Public License
//# along with this program; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//#
//# $Id$
//# Always #include <lofar_config.h> first!
#include
<lofar_config.h>
//# Includes
#include
<Common/LofarLogger.h>
#include
<Common/lofar_string.h>
using
namespace
LOFAR
;
int
main
(
int
argc
,
char
*
argv
[])
{
INIT_LOGGER
(
basename
(
argv
[
0
]));
switch
(
atoi
(
argv
[
1
]))
{
case
1
:
// do everything right
// not registered yet.
LOG_INFO
(
"This message is not shown in PVSS"
);
// register at right level
LOG_INFO
(
"MACProcessScope: LOFAR.Logger.Test"
);
LOG_INFO
(
"TEST1:Finally this message should appear in PVSS"
);
LOG_WARN
(
"TEST1:And this warning message also"
);
break
;
case
2
:
// register first at wrong level
// not registered yet.
LOG_INFO
(
"This message is not shown in PVSS"
);
// registering at wrong loglevel
LOG_DEBUG
(
"MACProcessScope: LOFAR.Logger.Test"
);
LOG_INFO
(
"This message is still not shown in PVSS"
);
// register at right level
LOG_INFO
(
"MACProcessScope: LOFAR.Logger.Test"
);
LOG_INFO
(
"TEST2:Finally this message should appear in PVSS"
);
LOG_WARN
(
"TEST2:And this warning message also"
);
break
;
case
3
:
{
// Don't register at all and produce more that 10 messages
for
(
int
i
=
1
;
i
<
15
;
i
++
)
{
LOG_INFO_STR
(
"TEST3: Message "
<<
i
);
}
}
break
;
case
4
:
{
// Register with wrong DP and produce more that 10 messages
for
(
int
i
=
1
;
i
<
15
;
i
++
)
{
LOG_INFO
(
"MACProcessScope: LOFAR.Logger.WrongTest"
);
LOG_INFO_STR
(
"TEST4: Message "
<<
i
);
}
}
break
;
default
:
cout
<<
"Syntax: tLoggingProcessor testnr"
<<
endl
;
break
;
}
return
(
0
);
}
This diff is collapsed.
Click to expand it.
MAC/APL/CURTDBDaemons/test/tLoggingProcessor.log_prop
0 → 100644
+
18
−
0
View file @
979b7d92
# add your custom loggers and appenders here
#
log4cplus.rootLogger=DEBUG, STDOUT, MACCLP
log4cplus.logger.TRC=DEBUG
log4cplus.additivity.TRC=FALSE
log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
log4cplus.appender.STDOUT.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S.%q} %-5p %c{9} - %m [%.25l]%n
log4cplus.appender.STDOUT.logToStdErr=true
log4cplus.appender.MACCLP=log4cplus::SocketAppender
log4cplus.appender.MACCLP.port=23999
log4cplus.appender.MACCLP.host=localhost
log4cplus.appender.MACCLP.Threshold=INFO
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment