mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-26 16:07:13 +00:00
devex: minimal first page load logs
This commit is contained in:
@@ -64,7 +64,7 @@ class HLReadDir extends HLFilesystemOperation {
|
||||
|
||||
let children;
|
||||
|
||||
this.log.noticeme('READDIR',
|
||||
this.log.debug('READDIR',
|
||||
{
|
||||
userdir: await subject.isUserDirectory(),
|
||||
namediff: await subject.get('name') !== user.username
|
||||
|
||||
@@ -192,7 +192,7 @@ module.exports = class DatabaseFSEntryFetcher extends BaseService {
|
||||
|
||||
if ( result[0] ) return result[0];
|
||||
|
||||
this.log.info(`findByPath (not cached): ${path}`)
|
||||
this.log.debug(`findByPath (not cached): ${path}`)
|
||||
|
||||
const loop = async () => {
|
||||
for ( let i=0 ; i < parts.length ; i++ ) {
|
||||
|
||||
@@ -185,7 +185,7 @@ class PuterFSProvider extends putility.AdvancedBase {
|
||||
}
|
||||
|
||||
if ( ! entry ) {
|
||||
controls.log.info(`entry not found: ${selector.describe(true)}`);
|
||||
controls.log.warn(`entry not found: ${selector.describe(true)}`);
|
||||
}
|
||||
|
||||
if ( entry === null || typeof entry !== 'object' ) {
|
||||
|
||||
@@ -390,12 +390,11 @@ class WebServerService extends BaseService {
|
||||
fields.status, fields.responseTime,
|
||||
].join(' ');
|
||||
|
||||
const log = this.services.get('log-service').create('morgan', {
|
||||
concern: 'web'
|
||||
});
|
||||
const log = this.services.get('log-service').create('morgan');
|
||||
try {
|
||||
this.context.arun(() => {
|
||||
log.info(message, fields);
|
||||
log.info(message);
|
||||
log.debug(message, fields);
|
||||
});
|
||||
} catch (e) {
|
||||
console.log('failed to log this message properly:', message, fields);
|
||||
|
||||
@@ -187,7 +187,7 @@ module.exports = function eggspress (route, settings, handler) {
|
||||
return next();
|
||||
}
|
||||
}
|
||||
if ( config.env === 'dev' ) {
|
||||
if ( config.env === 'dev' && process.env.DEBUG ) {
|
||||
console.log(`request url: ${req.url}, body: ${JSON.stringify(req.body)}`);
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -49,7 +49,7 @@ module.exports = eggspress('/readdir', {
|
||||
log = x.get('services').get('log-service').create('readdir', {
|
||||
concern: 'filesystem',
|
||||
});
|
||||
log.info(`readdir: ${req.body.subject || req.body.path || req.body.uid}`);
|
||||
log.debug(`readdir: ${req.body.subject || req.body.path || req.body.uid}`);
|
||||
}
|
||||
|
||||
const subject = req.values.subject;
|
||||
|
||||
@@ -62,7 +62,7 @@ class OperationFrame {
|
||||
this.status_ = status;
|
||||
this._calc_effective_status();
|
||||
|
||||
this.log.info(
|
||||
this.log.debug(
|
||||
`FRAME STATUS ${status.label} ` +
|
||||
(status !== this.effective_status_
|
||||
? `(effective: ${this.effective_status_.label}) `
|
||||
@@ -275,7 +275,7 @@ class OperationTraceService {
|
||||
x
|
||||
});
|
||||
parent && parent.push_child(frame);
|
||||
this.log.info(`FRAME START ` + frame.describe());
|
||||
this.log.debug(`FRAME START ` + frame.describe());
|
||||
if ( ! parent ) {
|
||||
// NOTE: only uncomment in local testing for now;
|
||||
// this will cause a memory leak until frame
|
||||
|
||||
Reference in New Issue
Block a user