You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am not able to see logs in my cloudwatch log group when I do any activity in application, It's just I got some logs when I deployed the changes for first time.
This is my logger file -
import { createLogger, format } from 'winston';
import WinstonCloudWatch from 'winston-cloudwatch';
import uuid from 'uuid';
import moment from 'moment-timezone';
Hi, I am not able to see logs in my cloudwatch log group when I do any activity in application, It's just I got some logs when I deployed the changes for first time.
This is my logger file -
import { createLogger, format } from 'winston';
import WinstonCloudWatch from 'winston-cloudwatch';
import uuid from 'uuid';
import moment from 'moment-timezone';
function messageFormatter({ timestamp, level, message }): string {
const logObject: LogObject = {
level: level.toUpperCase(),
timestamp,
message
};
}
export const logger = createLogger({
exitOnError: false,
format: format.combine(format.timestamp(), format.printf(messageFormatter)),
transports: [
new WinstonCloudWatch({
logGroupName: 'AmazonDefine-Frontend-Logs',
logStreamName:
define-frontend-logs-${moment.utc().format('YYYY-MM-DD')}-${uuid.v4()}
,awsRegion: 'us-west-2',
messageFormatter
})
]
});
interface LogObject {
level: string;
timestamp: string;
message: string;
}
The text was updated successfully, but these errors were encountered: