Enable BSG logging (!262)
Needs merged with: https://dev.sp-tarkov.com/SPT-AKI/Modules/pulls/96 Read details there. Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com> Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/262 Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com> Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
This commit is contained in:
parent
72ddbc4192
commit
be64e897b9
@ -5,6 +5,10 @@
|
||||
"serverName": "SPT Server",
|
||||
"profileSaveIntervalSeconds": 15,
|
||||
"sptFriendNickname": "SPT",
|
||||
"bsgLogging": {
|
||||
"verbosity": 6,
|
||||
"sendToServer": false
|
||||
},
|
||||
"release": {
|
||||
"betaDisclaimerTimeoutDelay": 30
|
||||
},
|
||||
|
@ -2,7 +2,7 @@ import { ClientLogController } from "@spt-aki/controllers/ClientLogController";
|
||||
import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder";
|
||||
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||
import { ICoreConfig, IRelease } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||
import { IBsgLogging, ICoreConfig, IRelease } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||
import { IClientLogRequest } from "@spt-aki/models/spt/logging/IClientLogRequest";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
@ -54,4 +54,14 @@ export class ClientLogCallbacks
|
||||
|
||||
return this.httpResponse.noBody(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle /singleplayer/enableBSGlogging
|
||||
*/
|
||||
|
||||
public bsgLogging(): string
|
||||
{
|
||||
const data: IBsgLogging = this.configServer.getConfig<ICoreConfig>(ConfigTypes.CORE).bsgLogging;
|
||||
return this.httpResponse.noBody(data);
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ export interface ICoreConfig extends IBaseConfig
|
||||
serverName: string;
|
||||
profileSaveIntervalSeconds: number;
|
||||
sptFriendNickname: string;
|
||||
bsgLogging: IBsgLogging;
|
||||
release: IRelease;
|
||||
fixes: IGameFixes;
|
||||
features: IServerFeatures;
|
||||
@ -18,6 +19,25 @@ export interface ICoreConfig extends IBaseConfig
|
||||
buildTime?: string;
|
||||
}
|
||||
|
||||
export interface IBsgLogging
|
||||
{
|
||||
/**
|
||||
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
|
||||
* complain to them about it! In all cases, better exceptions will be logged.
|
||||
* WARNING: trace-info logging will quickly create log files in the megabytes.
|
||||
* 0 - trace
|
||||
* 1 - debug
|
||||
* 2 - info
|
||||
* 3 - warn
|
||||
* 4 - error
|
||||
* 5 - fatal
|
||||
* 6 - off
|
||||
*/
|
||||
verbosity: number;
|
||||
// Should we send the logging to the server
|
||||
sendToServer: boolean;
|
||||
}
|
||||
|
||||
export interface IRelease
|
||||
{
|
||||
// Disclaimer outlining the intended usage of bleeding edge
|
||||
|
@ -17,6 +17,13 @@ export class ClientLogStaticRouter extends StaticRouter
|
||||
{
|
||||
return this.clientLogCallbacks.releaseNotes();
|
||||
}),
|
||||
new RouteAction(
|
||||
"/singleplayer/enableBSGlogging",
|
||||
(url: string, info: any, sessionID: string, output: string) =>
|
||||
{
|
||||
return this.clientLogCallbacks.bsgLogging();
|
||||
},
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user