bhartsfield
05/23/2022, 9:03 PMbdw429s
05/23/2022, 9:07 PMbhartsfield
05/23/2022, 9:08 PMbdw429s
05/23/2022, 9:12 PM--logaccess-dir
, but CommandBox automatically sets it for you using the same folder as the server out log, which is hard-set to the root of the server home. There is a setting in the JSON file, but it's never been used:
https://ortussolutions.atlassian.net/browse/COMMANDBOX-1257
The name of the access log file can be set in Runwar with --logaccess-basename
but it's also hard-coded in CommandBox to be called access
The suffix of the log file is defaulted in Runwar to txt
and there is no setting in place currently to override it.bdw429s
05/23/2022, 9:13 PMbdw429s
05/23/2022, 9:14 PMDefaultAccessLogReceiver requestsLogReceiver = DefaultAccessLogReceiver.builder().setLogWriteExecutor(logWorker)
.setRotate(true)
.setOutputDirectory(options.logRequestsDir().toPath())
.setLogBaseName(options.logRequestsBaseFileName())
.setLogNameSuffix(options.logSuffix())
.build();
bhartsfield
05/23/2022, 9:14 PMbhartsfield
05/23/2022, 9:14 PMbdw429s
05/23/2022, 9:15 PMbdw429s
05/23/2022, 9:15 PMif( serverInfo.accesslogenable ) {
args
.append( '--logaccess-enable' ).append( true )
.append( '--logaccess-basename' ).append( 'access' )
.append( '--logaccess-dir' ).append( serverInfo.logDir );
}
bdw429s
05/23/2022, 9:15 PMbhartsfield
05/23/2022, 9:15 PMbdw429s
05/23/2022, 9:15 PMserver log --access
would no longer workbdw429s
05/23/2022, 9:16 PMbdw429s
05/23/2022, 9:16 PMserverInfo.accessLogPath = serverInfo.logDir & '/access.txt';
bhartsfield
05/23/2022, 9:17 PMbhartsfield
05/23/2022, 9:20 PMbdw429s
05/23/2022, 9:21 PMbhartsfield
05/23/2022, 9:21 PMbhartsfield
05/23/2022, 9:26 PMbhartsfield
05/23/2022, 9:26 PMbdw429s
05/23/2022, 9:26 PMbdw429s
05/23/2022, 9:26 PMbdw429s
05/23/2022, 9:26 PMbhartsfield
05/23/2022, 9:27 PMbhartsfield
05/23/2022, 9:27 PMbdw429s
05/23/2022, 9:27 PM${serverinfo.webroot}
will probably do what you needbhartsfield
05/23/2022, 9:29 PMbhartsfield
05/23/2022, 9:30 PMbhartsfield
05/23/2022, 9:31 PM"runwar":{
"args":"--logaccess-enable true --logaccess-basename access --logaccess-dir ${LOG_FILE_ROOT}"
}
bhartsfield
05/23/2022, 9:35 PMbdw429s
05/23/2022, 9:37 PMbhartsfield
05/23/2022, 9:37 PMbdw429s
05/23/2022, 9:41 PM"runwar":{
"args": [
"--logaccess-enable=true",
"--logaccess-basename=access",
"--logaccess-dir=${LOG_FILE_ROOT}"
]
}
bdw429s
05/23/2022, 9:41 PM