mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-05 20:50:22 -06:00
devex: misc log cleanup
This commit is contained in:
@@ -457,7 +457,7 @@ class DatabaseFSEntryService extends BaseService {
|
||||
|
||||
const queue = this.currentState.queue;
|
||||
|
||||
this.log.info(
|
||||
this.log.debug(
|
||||
`Executing ${queue.length} operations...`
|
||||
);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class ResourceService extends BaseService {
|
||||
};
|
||||
});
|
||||
entry.onFree = entry.freePromise.then.bind(entry.freePromise);
|
||||
this.log.info(`registering resource`, { uid: entry.uid });
|
||||
this.log.debug(`registering resource`, { uid: entry.uid });
|
||||
this.uidToEntry[entry.uid] = entry;
|
||||
if ( entry.path ) {
|
||||
this.uidToPath[entry.uid] = entry.path;
|
||||
@@ -72,7 +72,7 @@ class ResourceService extends BaseService {
|
||||
}
|
||||
|
||||
free (uid) {
|
||||
this.log.info(`freeing`, { uid });
|
||||
this.log.debug(`freeing`, { uid });
|
||||
const entry = this.uidToEntry[uid];
|
||||
if ( ! entry ) return;
|
||||
delete this.uidToEntry[uid];
|
||||
|
||||
@@ -113,7 +113,9 @@ class PropType extends AdvancedBase {
|
||||
this.chains.factory && [...this.chains.factory].reverse()
|
||||
) || [];
|
||||
|
||||
console.log('FACTORIES', factories)
|
||||
if ( process.env.DEBUG ) {
|
||||
console.log('FACTORIES', factories);
|
||||
}
|
||||
|
||||
for ( const factory of factories ) {
|
||||
const result = await factory(extra);
|
||||
|
||||
@@ -59,13 +59,15 @@ const complete_ = async ({ req, res, user }) => {
|
||||
router.post('/login', express.json(), body_parser_error_handler,
|
||||
// Add diagnostic middleware to log captcha data
|
||||
(req, res, next) => {
|
||||
console.log('====== LOGIN CAPTCHA DIAGNOSTIC ======');
|
||||
console.log('LOGIN REQUEST RECEIVED with captcha data:', {
|
||||
hasCaptchaToken: !!req.body.captchaToken,
|
||||
hasCaptchaAnswer: !!req.body.captchaAnswer,
|
||||
captchaToken: req.body.captchaToken ? req.body.captchaToken.substring(0, 8) + '...' : undefined,
|
||||
captchaAnswer: req.body.captchaAnswer
|
||||
});
|
||||
if ( process.env.DEBUG ) {
|
||||
console.log('====== LOGIN CAPTCHA DIAGNOSTIC ======');
|
||||
console.log('LOGIN REQUEST RECEIVED with captcha data:', {
|
||||
hasCaptchaToken: !!req.body.captchaToken,
|
||||
hasCaptchaAnswer: !!req.body.captchaAnswer,
|
||||
captchaToken: req.body.captchaToken ? req.body.captchaToken.substring(0, 8) + '...' : undefined,
|
||||
captchaAnswer: req.body.captchaAnswer
|
||||
});
|
||||
}
|
||||
next();
|
||||
},
|
||||
requireCaptcha({ strictMode: true, eventType: 'login' }),
|
||||
|
||||
@@ -438,7 +438,7 @@ class ACLService extends BaseService {
|
||||
await appdata_node.is_above(fsNode)
|
||||
)
|
||||
) {
|
||||
console.log('TRUE BECAUSE APPDATA');
|
||||
this.log.debug('TRUE BECAUSE APPDATA');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ class AuthService extends BaseService {
|
||||
throw APIError.create('forbidden');
|
||||
}
|
||||
|
||||
this.log.info(`generating user-app token for app ${app_uid} and user ${actor_type.user.uuid}`, {
|
||||
this.log.debug(`generating user-app token for app ${app_uid} and user ${actor_type.user.uuid}`, {
|
||||
app_uid,
|
||||
user_uid: actor_type.user.uuid,
|
||||
})
|
||||
@@ -251,7 +251,7 @@ class AuthService extends BaseService {
|
||||
* session's metadata.
|
||||
*/
|
||||
async create_session_ (user, meta = {}) {
|
||||
this.log.info(`CREATING SESSION`);
|
||||
this.log.debug(`CREATING SESSION`);
|
||||
|
||||
if ( meta.req ) {
|
||||
const req = meta.req;
|
||||
|
||||
Reference in New Issue
Block a user