日志:添加日志

This commit is contained in:
luying
2022-01-11 09:37:58 +08:00
parent 4cb27adbd8
commit 3375abfa5b
2 changed files with 10 additions and 8 deletions

View File

@@ -31,6 +31,7 @@ import { getWorldChannelSid } from './chatService';
import { createMarqueeMsg, pushMarqueeMsg } from './sysChatService';
import { RegionModel, RegionType } from '../db/Region';
import { CreateServerParam } from '../domain/backEndField/params';
import { infologger } from '../util/logger';
const PER_SECOND = 1 * 1000;
const PER_DAY = 24 * 60 * 60;
@@ -193,6 +194,7 @@ export async function resetPvpSeasonTime(minute: number) {
export async function reportOnlineSchedule() {
let allRoles = await getAllOnlineRoles();
infologger.info('reportOnlineSchedule all roles count: ', allRoles.length);
console.log('reportOnlineSchedule all roles count: ', allRoles.length)
for (let { roleId, userCode, sid } of allRoles) {
let result = reportOneOnline(roleId, userCode, sid, false);

View File

@@ -7,7 +7,7 @@ module.exports = {
'type': 'file',
'filename': '/zyz_logs/log4js/con-log-${opts:serverId}.log',
'pattern': 'connector',
'maxLogSize': 1048576,
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
@@ -16,7 +16,7 @@ module.exports = {
'rpc-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/rpc-log-${opts:serverId}.log',
'maxLogSize': 1048576,
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
@@ -25,7 +25,7 @@ module.exports = {
'forward-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/forward-log-${opts:serverId}.log',
'maxLogSize': 1048576,
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
@@ -34,7 +34,7 @@ module.exports = {
'rpc-debug': {
'type': 'file',
'filename': '/zyz_logs/log4js/rpc-debug-${opts:serverId}.log',
'maxLogSize': 1048576,
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
@@ -43,7 +43,7 @@ module.exports = {
'crash-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/crash.log',
'maxLogSize': 1048576,
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
@@ -52,7 +52,7 @@ module.exports = {
'admin-log': {
'type': 'file',
'filename': '/zyz_logs/log4js/admin.log',
'maxLogSize': 1048576,
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
@@ -70,7 +70,7 @@ module.exports = {
'pinus-admin': {
'type': 'file',
'filename': '/zyz_logs/log4js/pinus-admin.log',
'maxLogSize': 1048576,
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},
@@ -79,7 +79,7 @@ module.exports = {
'pinus-rpc': {
'type': 'file',
'filename': '/zyz_logs/log4js/pinus-rpc-${opts:serverId}.log',
'maxLogSize': 1048576,
'maxLogSize': 104857600,
'layout': {
'type': 'basic'
},