mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
chore: change log level to info in origin middleware (#7705)
https://linear.app/unleash/issue/2-2492/change-origin-middleware-log-level-to-info Changes origin middleware log level to `info` instead of `debug`.
This commit is contained in:
parent
2822746fc1
commit
9fff29a080
@ -45,7 +45,7 @@ describe('originMiddleware', () => {
|
||||
|
||||
middleware(req, res, next);
|
||||
|
||||
expect(loggerMock.debug).toHaveBeenCalledWith('UI request', {
|
||||
expect(loggerMock.info).toHaveBeenCalledWith('UI request', {
|
||||
method: req.method,
|
||||
});
|
||||
});
|
||||
@ -58,7 +58,7 @@ describe('originMiddleware', () => {
|
||||
|
||||
middleware(req, res, next);
|
||||
|
||||
expect(loggerMock.debug).toHaveBeenCalledWith('API request', {
|
||||
expect(loggerMock.info).toHaveBeenCalledWith('API request', {
|
||||
method: req.method,
|
||||
userAgent: TEST_USER_AGENT,
|
||||
});
|
||||
|
@ -16,9 +16,9 @@ export const originMiddleware = ({
|
||||
const isUI = !req.headers.authorization;
|
||||
|
||||
if (isUI) {
|
||||
logger.debug('UI request', { method: req.method });
|
||||
logger.info('UI request', { method: req.method });
|
||||
} else {
|
||||
logger.debug('API request', {
|
||||
logger.info('API request', {
|
||||
method: req.method,
|
||||
userAgent: req.headers['user-agent'],
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user