Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
joram
joram
Commits
5917b8a3
Commit
5917b8a3
authored
Jun 24, 2020
by
Andre Freyssinet
Browse files
Logging enhancements.
parent
a7f527f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
joram/joram/tools/rest/jms/src/main/java/org/objectweb/joram/tools/rest/jms/Activator.java
View file @
5917b8a3
...
...
@@ -85,10 +85,11 @@ public class Activator implements BundleActivator {
if
(
value
!=
null
&&
!
value
.
isEmpty
())
{
try
{
period
=
Integer
.
parseInt
(
value
);
logger
.
log
(
BasicLevel
.
INFO
,
"Set configuration property "
+
Helper
.
BUNDLE_CLEANER_PERIOD_PROP
+
" to "
+
value
);
}
catch
(
NumberFormatException
exc
)
{
if
(
logger
.
isLoggable
(
BasicLevel
.
WARN
))
logger
.
log
(
BasicLevel
.
WARN
,
"Bad configuration property "
+
Helper
.
BUNDLE_CLEANER_PERIOD_PROP
+
", should be a number: "
+
value
,
exc
);
"Bad configuration property "
+
Helper
.
BUNDLE_CLEANER_PERIOD_PROP
+
", should be a number: "
+
value
);
}
}
if
(
period
>
0
)
{
...
...
joram/joram/tools/rest/jms/src/main/java/org/objectweb/joram/tools/rest/jms/Helper.java
View file @
5917b8a3
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2016 - 20
17
ScalAgent Distributed Technologies
* Copyright (C) 2016 - 20
20
ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -146,10 +146,11 @@ public class Helper {
if
(
value
!=
null
&&
!
value
.
isEmpty
())
{
try
{
globalIdleTimeout
=
Long
.
parseLong
(
value
);
logger
.
log
(
BasicLevel
.
INFO
,
"Set configuration property "
+
BUNDLE_IDLE_TIMEOUT_PROP
+
" to "
+
value
);
}
catch
(
NumberFormatException
exc
)
{
if
(
logger
.
isLoggable
(
BasicLevel
.
WARN
))
logger
.
log
(
BasicLevel
.
WARN
,
"Bad configuration property "
+
BUNDLE_IDLE_TIMEOUT_PROP
+
", should be a number: "
+
value
,
exc
);
"Bad configuration property "
+
BUNDLE_IDLE_TIMEOUT_PROP
+
", should be a number: "
+
value
);
}
}
}
...
...
@@ -338,7 +339,7 @@ public class Helper {
else
jmsContext
=
restClientCtx
.
getConnectionFactory
().
createContext
();
jmsContext
.
setClientID
(
restClientCtx
.
getClientId
());
jmsContext
.
setAutoStart
(
false
);
//the defaul is true.
jmsContext
.
setAutoStart
(
false
);
//the defaul
t
is true.
restClientCtx
.
setJmsContext
(
jmsContext
);
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
"Helper.createProducer jmsContext = "
+
restClientCtx
.
getJmsContext
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment