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

  • SEARCH
  • Home
  • 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 6983535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:25:55+00:00 2026-05-27T18:25:55+00:00

I intend to use syslog for logging in an application. I need to be

  • 0

I intend to use syslog for logging in an application. I need to be able to disable logging, at compile time, perhaps using a macro. Is this possible to do with the syslog facilities, or do I need to wrap syslog in my own macros/functions? The ability to disable/enable log messages based on their priority is a plus.

  • 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-05-27T18:25:56+00:00Added an answer on May 27, 2026 at 6:25 pm

    Maybe you could wrap a call to setlogmask in define block.

    setlogmask sets a mask (the “logmask”) that determines which future
    syslog calls shall be ignored. If a program has not called setlogmask,
    syslog doesn’t ignore any calls. You can use setlogmask to specify
    that messages of particular priorities shall be ignored in the future.

    something like this :

    #ifdef LOG_LEVEL1
    setlogmask (LOG_UPTO (LOG_NOTICE));
    #endif
    #ifdef LOG_LEVEL2
    setlogmask (LOG_UPTO (LOG_WARNING));
    #endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I intend to develop an application using .Net 4.0, and intend to use EF4
I am making a Prism desktop application and intend to use WCF services to
I need to create a webcam chat which i intend to use in my
I'm starting a new project. I intend to use Maven for the first time.
I have wrote a basic web service using .net which I intend to use
Is it possible to suppress this specific warning by using @SuppressWarnings(???) ? (I don't
I intend to use a Rails app to serve real-time data processed by a
I have this GenericRepository class that I intend to use as a base-class for
I'm doing a platform independent PyQt application. I intend to use write a setup.py
I'm new to akka and intend to use it in my new project as

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.