Skip to content

Use default value for .publish - #26139

Merged
pzygielo merged 1 commit into
eclipse-ee4j:mainfrom
pzygielo:no-explicit-publish
Jul 10, 2026
Merged

Use default value for .publish#26139
pzygielo merged 1 commit into
eclipse-ee4j:mainfrom
pzygielo:no-explicit-publish

Conversation

@pzygielo

Copy link
Copy Markdown
Contributor

The only other explicit publish I've found is (setting to the non-default):

@LogMessageInfo(
message = "The Work named [ {0} ], progress [ {1} ].",
comment = "Print Work status",
level = "INFO",
publish = false)

OTOH - this publish flag does not seem to be used by GF at all.

Maybe it could be used or - dropped from @LogMessageInfo? 🤔

@dmatej dmatej left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My question is what exactly the publish argument does?
Relates to eclipse-ee4j/glassfish-logging-annotation-processor#107

@pzygielo
pzygielo marked this pull request as ready for review July 10, 2026 18:48
@pzygielo
pzygielo merged commit 0b92830 into eclipse-ee4j:main Jul 10, 2026
5 checks passed
@pzygielo
pzygielo deleted the no-explicit-publish branch July 10, 2026 18:48
@pzygielo

Copy link
Copy Markdown
Contributor Author

My question is what exactly the publish argument does?

publish: Boolean value indicates whether this log message should be
         published in the Error Reference guide. (default: true)

(a bit similar to https://github.com/eclipse-ee4j/glassfish-logging-annotation-processor/blob/d2c1831ea651b9bbf6c2813dec30748e4b4e1cb2/src/main/java/org/glassfish/logging/annotation/LoggerInfo.java#L29).

  • My initial thought was: "Maybe it is or could be used by glassfish-doc-maven-plugin". I could not confirm this to be the case. I also do not think java sources (out of /docs) or binaries are used for documentation preparation, but I'm not 100% sure about that.
  • Also coming from Store LogMessageInfo.publish flag glassfish-logging-annotation-processor#107
    • that whole _details properties with action, cause and level (and possibly publish) - what are they used for? Were they used in GF ever before (i.e. before migration to JUL)? Perhaps we could drop (first from glassfish-logging-annotation-processor) ALL attributes that land in _details and not produce _details? I'm slowly exploring this.
    • I'm also learning how files generated into META-INF

But - by using default for publish - it will leave only one place to modify if publish is removed from @. 😁

OR GF could use _details in logging. (Or I could find that is does.)

@pzygielo pzygielo added this to the 8.0.4 milestone Jul 10, 2026
@dmatej

dmatej commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Aha, I believe around 2003 there was a trend to create multilanguage applications including logging (JUL was added in Java 1.4.2 if I remember well), so at some point they tried to integrate everything to the Ant build, later to Maven, but never finished.
I think some man pages are generated somehow (different story), I am also quite sure somewhere was a list of those "id based" log messages.

At some point there was a ML distribution of GlassFish, surprisingly some versions differed in behavior between ML and SL, so I remember far far in the past we were switching between them with SJAS9.

However now we slowly remove these things, logs are in plain english, UI too, so this doesn't make much sense. Perhaps with AI, however AI can read logs without a need of IDs and translations, so ... no.

@pzygielo

pzygielo commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Error Message Reference lists some IDs but they seem to come from checked-in docs/error-messages-reference/src/main/asciidoc/error-messages.adoc. (And they have cause and action.) That's why I suspected glassfish-doc-maven-plugin to play a part.

I'm yet to learn the level of consistency there. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants