Persistent application logs for NodeJS app on azure app service
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I have a nodejs app which is nothing but a BOT built using Microsoft's bot builder framework. I created an azure app service to host this app. I would like to find a way to persist all the application logs and web server logs as well (if possible) to some persistent store. Just like native web applications where we can look up logs on a app server & debug the application issues.
After doing some research I found official document from microsoft on this but looks like it has following limitations.
- We can't use file storage option of app service as it's good for 12
hours only so logs will not be saved forever. - Currently only .NET application logs can be written to the blob
storage. Java, PHP, Node.js, Python application logs can only be
stored on the file system (without code modifications to write logs
to external storage).
I would like to check if anyone has tried any different approach for nodejs app. If yes then please share.
Thank you.
node.js azure logging azure-storage azure-web-app-service
add a comment |
I have a nodejs app which is nothing but a BOT built using Microsoft's bot builder framework. I created an azure app service to host this app. I would like to find a way to persist all the application logs and web server logs as well (if possible) to some persistent store. Just like native web applications where we can look up logs on a app server & debug the application issues.
After doing some research I found official document from microsoft on this but looks like it has following limitations.
- We can't use file storage option of app service as it's good for 12
hours only so logs will not be saved forever. - Currently only .NET application logs can be written to the blob
storage. Java, PHP, Node.js, Python application logs can only be
stored on the file system (without code modifications to write logs
to external storage).
I would like to check if anyone has tried any different approach for nodejs app. If yes then please share.
Thank you.
node.js azure logging azure-storage azure-web-app-service
add a comment |
I have a nodejs app which is nothing but a BOT built using Microsoft's bot builder framework. I created an azure app service to host this app. I would like to find a way to persist all the application logs and web server logs as well (if possible) to some persistent store. Just like native web applications where we can look up logs on a app server & debug the application issues.
After doing some research I found official document from microsoft on this but looks like it has following limitations.
- We can't use file storage option of app service as it's good for 12
hours only so logs will not be saved forever. - Currently only .NET application logs can be written to the blob
storage. Java, PHP, Node.js, Python application logs can only be
stored on the file system (without code modifications to write logs
to external storage).
I would like to check if anyone has tried any different approach for nodejs app. If yes then please share.
Thank you.
node.js azure logging azure-storage azure-web-app-service
I have a nodejs app which is nothing but a BOT built using Microsoft's bot builder framework. I created an azure app service to host this app. I would like to find a way to persist all the application logs and web server logs as well (if possible) to some persistent store. Just like native web applications where we can look up logs on a app server & debug the application issues.
After doing some research I found official document from microsoft on this but looks like it has following limitations.
- We can't use file storage option of app service as it's good for 12
hours only so logs will not be saved forever. - Currently only .NET application logs can be written to the blob
storage. Java, PHP, Node.js, Python application logs can only be
stored on the file system (without code modifications to write logs
to external storage).
I would like to check if anyone has tried any different approach for nodejs app. If yes then please share.
Thank you.
node.js azure logging azure-storage azure-web-app-service
node.js azure logging azure-storage azure-web-app-service
edited Jan 7 at 4:43
vijay
asked Jan 4 at 4:45
vijayvijay
306
306
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
So I would respond by saying that this is not really a Bot specific problem... meaning you would have the same problem if you were writing a vanilla Web API and wanted to have persistent logs. You need to pick on a logging technology that let's you log to a more persistent store than just the file system.
Since you're using Node you might want to look at leveraging the Winston logging framework which has an abstraction for various transports to be plugged in. Then you would plug in the Azure Storage Blob Transport when running in production and that will ensure that your logs are written out to Azure Storage.
Still, you'd have to go collect those from Azure Storage and aggregate them yourself which can be painful. If you really want real-time a distributed tracing system though, you might want to look into using Application Insights instead. There's even a Winston transport for that as well if you want to stay abstracted from using AI directly and just use it as another log stream.
1
Thank you. I will go over those options you provided and see which is the best fit for us.
– vijay
Jan 4 at 20:00
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54033239%2fpersistent-application-logs-for-nodejs-app-on-azure-app-service%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
So I would respond by saying that this is not really a Bot specific problem... meaning you would have the same problem if you were writing a vanilla Web API and wanted to have persistent logs. You need to pick on a logging technology that let's you log to a more persistent store than just the file system.
Since you're using Node you might want to look at leveraging the Winston logging framework which has an abstraction for various transports to be plugged in. Then you would plug in the Azure Storage Blob Transport when running in production and that will ensure that your logs are written out to Azure Storage.
Still, you'd have to go collect those from Azure Storage and aggregate them yourself which can be painful. If you really want real-time a distributed tracing system though, you might want to look into using Application Insights instead. There's even a Winston transport for that as well if you want to stay abstracted from using AI directly and just use it as another log stream.
1
Thank you. I will go over those options you provided and see which is the best fit for us.
– vijay
Jan 4 at 20:00
add a comment |
So I would respond by saying that this is not really a Bot specific problem... meaning you would have the same problem if you were writing a vanilla Web API and wanted to have persistent logs. You need to pick on a logging technology that let's you log to a more persistent store than just the file system.
Since you're using Node you might want to look at leveraging the Winston logging framework which has an abstraction for various transports to be plugged in. Then you would plug in the Azure Storage Blob Transport when running in production and that will ensure that your logs are written out to Azure Storage.
Still, you'd have to go collect those from Azure Storage and aggregate them yourself which can be painful. If you really want real-time a distributed tracing system though, you might want to look into using Application Insights instead. There's even a Winston transport for that as well if you want to stay abstracted from using AI directly and just use it as another log stream.
1
Thank you. I will go over those options you provided and see which is the best fit for us.
– vijay
Jan 4 at 20:00
add a comment |
So I would respond by saying that this is not really a Bot specific problem... meaning you would have the same problem if you were writing a vanilla Web API and wanted to have persistent logs. You need to pick on a logging technology that let's you log to a more persistent store than just the file system.
Since you're using Node you might want to look at leveraging the Winston logging framework which has an abstraction for various transports to be plugged in. Then you would plug in the Azure Storage Blob Transport when running in production and that will ensure that your logs are written out to Azure Storage.
Still, you'd have to go collect those from Azure Storage and aggregate them yourself which can be painful. If you really want real-time a distributed tracing system though, you might want to look into using Application Insights instead. There's even a Winston transport for that as well if you want to stay abstracted from using AI directly and just use it as another log stream.
So I would respond by saying that this is not really a Bot specific problem... meaning you would have the same problem if you were writing a vanilla Web API and wanted to have persistent logs. You need to pick on a logging technology that let's you log to a more persistent store than just the file system.
Since you're using Node you might want to look at leveraging the Winston logging framework which has an abstraction for various transports to be plugged in. Then you would plug in the Azure Storage Blob Transport when running in production and that will ensure that your logs are written out to Azure Storage.
Still, you'd have to go collect those from Azure Storage and aggregate them yourself which can be painful. If you really want real-time a distributed tracing system though, you might want to look into using Application Insights instead. There's even a Winston transport for that as well if you want to stay abstracted from using AI directly and just use it as another log stream.
answered Jan 4 at 18:58
Drew MarshDrew Marsh
30.5k26792
30.5k26792
1
Thank you. I will go over those options you provided and see which is the best fit for us.
– vijay
Jan 4 at 20:00
add a comment |
1
Thank you. I will go over those options you provided and see which is the best fit for us.
– vijay
Jan 4 at 20:00
1
1
Thank you. I will go over those options you provided and see which is the best fit for us.
– vijay
Jan 4 at 20:00
Thank you. I will go over those options you provided and see which is the best fit for us.
– vijay
Jan 4 at 20:00
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54033239%2fpersistent-application-logs-for-nodejs-app-on-azure-app-service%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown