malapert@heulet-HP-ZBook-15-G4:~/DOI$ java -Dlog4j.configurationFile=./log4j2.xml -jar DOI-server.jar -h ------------ Help for DOI Server ----------- Usage: java -jar DOI-server.jar [--secret <key>] [OPTIONS] [-s] with : --secret <key> : The 16 bits secret key to crypt/decrypt --key-sign-secret <key> : The key to sign the token If not provided, a default one is used -s|--start : Starts the server -t|--stop : Stops the server -l|--status : Status of the server with OPTIONS: -h|--help : This output -k|--key-sign : Creates a key to sign JWT token -c <string> : Crypts a string in the standard output -e <string> : Decrypts a string in the standard output -d : Displays the configuration file -f <path> : Loads the configuation file -y|--cryptProperties <path> : crypts the properties file on the output standard -z|--decryptProperties <path>: Decrypts the properties on the output standard -v|--version : DOI server version
malapert@heulet-HP-ZBook-15-G4:~/DOI$ java -Dlog4j.configurationFile=./log4j2.xml -jar DOI-server.jar -v DOI-server (Copyright 2017-2019 CNES) - Version:1.0.0
java -Dlog4j.configurationFile=server/target/log4j2.xml -jar server/target/DOI-server-1.0.0.jar -d > doi.conf
See configuration
<?xml version="1.0" encoding="UTF-8"?> <Configuration status="INFO"> <properties> <property name="servicename">doiserver</property> <property name="patternPerfo">%-5p | %d{yyyy-MM-dd HH:mm:ss} | [%t] %C{2} (%F:%L) - %m%n</property> <property name="patternFile">%-5level %d{yyyy-MM-dd HH:mm:ss} %C{2} (%F:%L) - %m%n</property> <property name="patternApi">[%-5p - %t] %d %c - %m%n</property> <property name="patternSecurity">%d{yyyy-MM-dd HH:mm:ss} %C{2} (%F:%L) - %m%n</property> </properties> <Appenders> <Syslog name="syslog" host="localhost" port="514" protocol="UDP" appName="${servicename}"> </Syslog> <RollingFile name="RollingFilePerfo" fileName="logs/doi-perfo.log" filePattern="logs/$${date:yyyy-MM}/perfo-%d{yyyy-MM-dd}-%i.log.gz"> <PatternLayout> <pattern>${patternPerfo}</pattern> </PatternLayout> <Policies> <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB --> </Policies> </RollingFile> <RollingFile name="RollingFileFile" fileName="logs/doi-file.log" filePattern="logs/$${date:yyyy-MM}/file-%d{yyyy-MM-dd}-%i.log.gz"> <PatternLayout> <pattern>${patternFile}</pattern> </PatternLayout> <Policies> <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB --> </Policies> </RollingFile> <RollingFile name="RollingFileApi" fileName="logs/doi-api.log" filePattern="logs/$${date:yyyy-MM}/api-%d{yyyy-MM-dd}-%i.log.gz"> <PatternLayout> <pattern>${patternApi}</pattern> </PatternLayout> <Policies> <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB --> </Policies> </RollingFile> <RollingFile name="RollingFileSecurity" fileName="logs/doi-security.log" filePattern="logs/$${date:yyyy-MM}/security-%d{yyyy-MM-dd}-%i.log.gz"> <PatternLayout> <pattern>${patternSecurity}</pattern> </PatternLayout> <Policies> <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB --> </Policies> </RollingFile> <Console name="CONSOLE" target="SYSTEM_OUT"> <PatternLayout pattern="%highlight{%d [%t] %-5level}: %msg%n%throwable"/><!--%highlight{%d [%t] %-5level}: %msg%n%throwable--> </Console> <Console name="SHELL" target="SYSTEM_OUT"> <PatternLayout pattern="%msg%n"/> </Console> </Appenders> <Loggers> <Logger name="fr.cnes.doi.logging.security" level="INFO"> <AppenderRef ref="RollingFileSecurity"/> <appender-ref ref="syslog"/> </Logger> <Logger name="fr.cnes.doi.logging.app" level="INFO"> <AppenderRef ref="RollingFilePerfo"/> </Logger> <Logger name="fr.cnes.doi.logging.api" level="INFO"> <AppenderRef ref="RollingFileApi"/> <appender-ref ref="syslog"/> </Logger> <Logger name="fr.cnes.doi.application" level="INFO"> <AppenderRef ref="RollingFileFile"/> </Logger> <Logger name="fr.cnes.doi.logging.shell" level="INFO"> <AppenderRef ref="SHELL"/> </Logger> <Logger name="fr.cnes.doi.server" level="INFO"> <AppenderRef ref="FILE"/> </Logger> <Root level="INFO"> <AppenderRef ref="FILE"/> </Root> </Loggers> </Configuration>