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 8811775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:26:50+00:00 2026-06-14T03:26:50+00:00

I am working with Apache log4j (http://logging.apache.org/log4j/2.x/) and I realized that in their implementation

  • 0

I am working with Apache log4j (http://logging.apache.org/log4j/2.x/) and I realized that in their implementation they always declared their function like this:

  static
  public
  Logger getLogger(Class clazz) {
    return LogManager.getLogger(clazz.getName());
  }

instead of

  static public Logger getLogger(Class clazz) {
    return LogManager.getLogger(clazz.getName());
  }

Is there any good reason for using this style?

  • 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-14T03:26:51+00:00Added an answer on June 14, 2026 at 3:26 am

    On the FAQ it says:

    Log4j has adopted a rather conservative approach by following the Code
    Conventions for the JavaTM
    Programming Language

    However, if you check the examples in the Java Coding Conventions, you find that all the modifiers go on a single line before the function:

    public void doSomethingElse(Object someParam);
    

    If I’d have to guess, I’d say it makes the diff easier to spot when committing patches and also maybe avoids long lines.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my web application I am using apache logging log4j. When I was working
I have a codeigniter code that is working on local Apache installation. But it
My application has a homebrew logging class that I'm migrating to using log4j under
I'm trying to get log4j application (webapp) logging working in a Tomcat 6 app.
I'm working on a new Groovy app which uses log4j for logging, but when
I'm working on an Apache Wicket project in Eclipse with Maven2 -- my SCM
I'm working with the Apache Thrift tool and i'm throwing some Exceptions from the
I've been working with the Apache Mahout machine learning libaries in my free time
I have a working WAMP environment (Apache Friends). I decided to try Subversion and
I'm currently running a working Spring + Apache Tiles webapp. I need to show

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.