mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
remove server.log setting item
This commit is contained in:
1 parent
e62e7b49a3
commit
ee78271a84
27 files changed
+159
-114
No files matched your search
@@ -13,6 +13,15 @@ export async function update() {
|
||||
global.Hydro.stat.reqCount = 0;
|
||||
}
|
||||
|
||||
export function updateJudger(args) {
|
||||
args.type = 'judger';
|
||||
return coll.updateOne(
|
||||
{ mid: args.mid, type: 'judger' },
|
||||
{ $set: args },
|
||||
{ upsert: true },
|
||||
);
|
||||
}
|
||||
|
||||
global.Hydro.postInit.push(
|
||||
async () => {
|
||||
const info = await sysinfo.get();
|
||||
@@ -25,4 +34,4 @@ global.Hydro.postInit.push(
|
||||
},
|
||||
);
|
||||
|
||||
global.Hydro.service.monitor = { update };
|
||||
global.Hydro.service.monitor = { update, updateJudger };
|
||||
@@ -743,8 +743,8 @@ export function Connection(
|
||||
|
||||
// TODO use postInit?
|
||||
export async function start() {
|
||||
const [disableLog, port] = await system.getMany(['server.log', 'server.port']);
|
||||
if (!disableLog) {
|
||||
const port = await system.get('server.port');
|
||||
if (!argv.debug) {
|
||||
app.use(morgan(':method :url :status :res[content-length] - :response-time ms', {
|
||||
skip: (req, res) => res.hasHeader('nolog'),
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user