Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Thread name

  1. #1
    New Coder
    Join Date
    Dec 2006
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thread name

    I'm developing an application on visual studio 2005, and I want to know how can I set the thread name for my application.

    Background: I'm using log4net for logging app-messages, if defined under ConversionPattern message also cantains thread name and incase thread does not have a name it shows the thread ID which I'm getting in my log messages.

    eg:
    2007-05-24 14:52:03,858 [11] INFO CSVLogger - test msg
    2007-05-24 14:52:46,219 [9] INFO CSVLogger - test msg

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    well, the Thread class has a Name property, try to set that to a value of your choice........
    I am the luckiest man in the world


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •