mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix: refactoring logs and adding pino logger for production and dev.
This commit is contained in:
@@ -104,7 +104,7 @@ export const PATCH = withAgentCheck(async (request: Request, {params, agent}: {
|
|||||||
}) => {
|
}) => {
|
||||||
try {
|
try {
|
||||||
const body: BodyPatch = await request.json();
|
const body: BodyPatch = await request.json();
|
||||||
log.debug({data: body}, "Body from PATH in backup route");
|
log.info({data: body}, "Body from PATH in backup route");
|
||||||
|
|
||||||
const status = body.status
|
const status = body.status
|
||||||
const backupId = body.backupId
|
const backupId = body.backupId
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export const POST = withAgentCheck(async (request: Request, {params, agent}: {
|
|||||||
try {
|
try {
|
||||||
const body: Body = await request.json();
|
const body: Body = await request.json();
|
||||||
|
|
||||||
log.debug({data: body}, "Body for backup upload init");
|
log.info({data: body}, "Body for backup upload init");
|
||||||
|
|
||||||
const generatedId = body.generatedId;
|
const generatedId = body.generatedId;
|
||||||
const storageChannelId = body.storageChannelId;
|
const storageChannelId = body.storageChannelId;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export const PATCH = withAgentCheck(async (request: Request, {params, agent}: {
|
|||||||
const backupStorageId = body.backupStorageId;
|
const backupStorageId = body.backupStorageId;
|
||||||
const backupId = body.backupId;
|
const backupId = body.backupId;
|
||||||
|
|
||||||
log.debug({data: body}, "Body for backup upload status");
|
log.info({data: body}, "Body for backup upload status");
|
||||||
|
|
||||||
const database = await getDatabaseOrThrow(generatedId);
|
const database = await getDatabaseOrThrow(generatedId);
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export async function POST(
|
|||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const agentId = (await params).agentId
|
const agentId = (await params).agentId
|
||||||
log.debug(`Agent ID: ${agentId}`)
|
log.info(`Agent ID: ${agentId}`)
|
||||||
const body: Body = await request.json();
|
const body: Body = await request.json();
|
||||||
const lastContact = new Date();
|
const lastContact = new Date();
|
||||||
let message: string
|
let message: string
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export async function GET(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
log.debug({input: input}, "Dispatch Storage");
|
log.info({input: input}, "Dispatch Storage");
|
||||||
|
|
||||||
const result = await dispatchStorage(input, undefined, storageId);
|
const result = await dispatchStorage(input, undefined, storageId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user