Azure应用服务中的重复日志消息

时间:2018-02-28 16:42:21

标签: node.js azure azure-mobile-services

我有一个Azure App Service作为后端,使用Node编写,当前启用了详细日志记录。在应用程序日志中,我似乎总是会收到各种请求的重复日志消息。

2018-02-28T16:26:33  PID[22384] Verbose     Received request: GET https://appname.azurewebsites.net/tables/TableOne?$filter=(email%20eq%20'stevejohns%40gmail.com')
2018-02-28T16:26:33  PID[22384] Verbose     Received request: GET https://appname.azurewebsites.net/tables/TableOne?$filter=(email%20eq%20'stevejohns%40gmail.com')

我已经确认此问题不在我的移动应用程序中,因为如果我发送邮递员的请求,结果是相同的。这让我相信我在某种程度上有一个在服务中运行的东西的第二个实例。我尽可能地浏览了Kudu,但没有发现会导致此日志记录问题的任何迹象。

请参阅下面的我当前的app.js和TableOne.js文件。

非常感谢任何提示!

app.js

var express = require('express'), azureMobileApps = require('azure-mobile-apps');
var app = express();

var mobile = azureMobileApps({
    homePage: true
});

mobile.tables.import('./tables');
mobile.api.import('./api');

mobile.tables.initialize()
.then(function () {
    app.use(mobile);    
    app.listen(process.env.PORT || 3000);
});

TableOne.js

var azureMobileApps = require('azure-mobile-apps');

var table = azureMobileApps.table();

table.access = 'authenticated';

table.name = 'TableOne';
table.maxTop = 1000;
table.softDelete = false;
table.dynamicSchema = false;
table.columns = {
    firstname: 'string',
    lastname: 'string',
    email: 'string',
    profilepictureurl: 'string',
    phonenumber: 'string'
};

table.insert(function (context) {
    return context.execute();
});

table.read(function (context) {
    return context.execute();
});

table.update(function (context) {
    return context.execute();
});

table.delete(function (context) {
    return context.execute();
});

module.exports = table;

0 个答案:

没有答案
相关问题