Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9011759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:49:19+00:00 2026-06-16T02:49:19+00:00

I am implementing logging in my app via NLog. This is my Nlog.Config: <?xml

  • 0

I am implementing logging in my app via NLog. This is my Nlog.Config:

 <?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <targets async="true">
    <target xsi:type="File"
            name="ExceptionTarget"
            fileName="LOG.txt"
            layout="${date:format=dd MMM yyyy HH-mm-ss} ${uppercase:${level}} ${newline}${message} ${exception::maxInnerExceptionLevel=5:format=ToString}${newline}${stacktrace}${newline}"/>
  </targets>

  <targets async="true">
    <target xsi:type="File"
            name="InfoTarget"
            fileName="LOG.txt"
            layout="${date:format=mm-ss} ${uppercase:${level}} ${newline}${message} ${newline}"/>
  </targets>

  <rules>
    <logger name="*" level="Error" writeTo="ExceptionTarget"/>
    <logger name="*" level="Info" writeTo="InfoTarget"/>
  </rules>
</nlog>

When I deploy the app out with ClickOnce, no log.txt file is being created. No errors occur, and my app runs as normal, but nothing is happening.

How to solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:49:21+00:00Added an answer on June 16, 2026 at 2:49 am

    The ClickOnce installer is not deploying the NLog.config file when the software is installed, so your app do not have any logging configuration.

    Solution:

    1. You could merge the logging config into your app.config file.
    2. Nlog.config must have: Build Action: Content and Copy to Output Directory: Copy always.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm planning to use DotNetOpenAuth(http://www.dotnetopenauth.net/) for implementing openid logging for my application. Initially I
I'm using an enum singleton, but implementing logging is troublesome. This: public enum Foo
I am working on a project, and am currently working on implementing some logging
This question is related to Implementing logging in a Java application , but since
we are currently implementing logging functionality with Log4net into our ASP.NET web-services. Therefore we
I am implementing a logging function and I would like to keep track of
implementing publishActivity in PHP using the REST API using this code: $activity = array(
I'm implementing a logging feature on a asp.net mvc2 application, that uses SqlServer2008 as
After searching for the answers to my questions Implementing logging in a Java application
In my CI server, I'm implementing some logging/audit functionality - after every Fit test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.