Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cameo
cameo
Commits
791720c5
Commit
791720c5
authored
Apr 07, 2020
by
legoc
Browse files
Merge branch 'master' into responder-timeout
parents
0b09034f
15ba286c
Changes
4
Hide whitespace changes
Inline
Side-by-side
cameo-server-jzmq/pom.xml
View file @
791720c5
...
...
@@ -13,7 +13,7 @@
<dependency>
<groupId>
fr.ill.ics
</groupId>
<artifactId>
cameo-server
</artifactId>
<version>
0.1.
5
</version>
<version>
0.1.
6
</version>
<exclusions>
<exclusion>
<groupId>
fr.ill.ics
</groupId>
...
...
cameo-server/src/main/java/fr/ill/ics/cameo/manager/ConfigManager.java
View file @
791720c5
...
...
@@ -162,11 +162,19 @@ public final class ConfigManager {
}
public
void
setHost
(
String
host
)
{
// If host is provided, set it.
if
(
host
==
null
)
{
try
{
// Otherwise try to get the hostname.
this
.
host
=
InetAddress
.
getLocalHost
().
getHostName
();
}
catch
(
UnknownHostException
e
)
{
this
.
host
=
"localhost"
;
try
{
// Otherwise try to get the IP address.
this
.
host
=
InetAddress
.
getLocalHost
().
getHostAddress
();
}
catch
(
UnknownHostException
e2
)
{
// Otherwise set localhost.
this
.
host
=
"localhost"
;
}
}
}
else
{
this
.
host
=
host
;
...
...
cameo-server/src/main/java/fr/ill/ics/cameo/manager/LogInfo.java
View file @
791720c5
...
...
@@ -62,10 +62,10 @@ public final class LogInfo {
if
(!
logDirectory
.
exists
())
{
logDirectory
.
mkdir
();
}
FileHandler
fileHandler
=
new
FileHandler
(
ConfigManager
.
getInstance
().
getLogPath
()
+
"/cameo.log"
,
false
);
fileHandler
.
setFormatter
(
new
LogFormatter
());
fileHandler
.
setLevel
(
Level
.
F
IN
E
);
fileHandler
.
setLevel
(
Level
.
IN
FO
);
logger
.
addHandler
(
fileHandler
);
if
(
ConfigManager
.
getInstance
().
isDebugMode
())
{
...
...
cameo-server/src/main/java/fr/ill/ics/cameo/manager/Manager.java
View file @
791720c5
...
...
@@ -59,7 +59,7 @@ public class Manager extends ConfigLoader {
public
Manager
(
String
xmlPath
)
{
super
(
xmlPath
);
LogInfo
.
getInstance
().
init
();
LogInfo
.
getInstance
().
getLogger
().
f
in
e
(
"Endpoint is "
+
ConfigManager
.
getInstance
().
getHostEndpoint
());
LogInfo
.
getInstance
().
getLogger
().
in
fo
(
"Endpoint is "
+
ConfigManager
.
getInstance
().
getHostEndpoint
());
showApplicationConfigs
();
...
...
@@ -76,7 +76,7 @@ public class Manager extends ConfigLoader {
public
Manager
(
InputStream
configStream
)
{
super
(
configStream
);
LogInfo
.
getInstance
().
init
();
LogInfo
.
getInstance
().
getLogger
().
f
in
e
(
"Endpoint is "
+
ConfigManager
.
getInstance
().
getHostEndpoint
());
LogInfo
.
getInstance
().
getLogger
().
in
fo
(
"Endpoint is "
+
ConfigManager
.
getInstance
().
getHostEndpoint
());
showApplicationConfigs
();
...
...
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