[Geoserver-devel] More obvious logging for data dir lookup

Currently if the user specified data directory can not be read, either for permissions reasons, or the directory does not exist because of a mistype, etc… the condition is logged at the FINE level.

Recently we had a client mention that this wasn’t obvious and I tend to agree. Any objections to upping it to either INFO or even WARNING? The code in question lives here:

https://github.com/geoserver/geoserver/blob/master/src/platform/src/main/java/org/geoserver/platform/GeoServerResourceLoader.java#L611

If no objection any preference to INFO or WARNING? I am thinking WARNING.

-Justin

Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive

On Wed, Mar 19, 2014 at 5:49 PM, Justin Deoliveira <
jdeolive@anonymised.com> wrote:

Currently if the user specified data directory can not be read, either for
permissions reasons, or the directory does not exist because of a mistype,
etc... the condition is logged at the FINE level.

Recently we had a client mention that this wasn't obvious and I tend to
agree. Any objections to upping it to either INFO or even WARNING? The code
in question lives here:

https://github.com/geoserver/geoserver/blob/master/src/platform/src/main/java/org/geoserver/platform/GeoServerResourceLoader.java#L611

If no objection any preference to INFO or WARNING? I am thinking WARNING.

Agreed it should be higher up. Warning seems like a better choice, as from
there, we have a good chance nothing
else will really work.

Question, this lookup happens only once at startup?
And if nothing is set and we are using the embedded data dir, nothing is
logged, right?

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Wed, Mar 19, 2014 at 11:01 AM, Andrea Aime
<andrea.aime@anonymised.com>wrote:

On Wed, Mar 19, 2014 at 5:49 PM, Justin Deoliveira <
jdeolive@anonymised.com> wrote:

Currently if the user specified data directory can not be read, either
for permissions reasons, or the directory does not exist because of a
mistype, etc... the condition is logged at the FINE level.

Recently we had a client mention that this wasn't obvious and I tend to
agree. Any objections to upping it to either INFO or even WARNING? The code
in question lives here:

https://github.com/geoserver/geoserver/blob/master/src/platform/src/main/java/org/geoserver/platform/GeoServerResourceLoader.java#L611

If no objection any preference to INFO or WARNING? I am thinking WARNING.

Agreed it should be higher up. Warning seems like a better choice, as from
there, we have a good chance nothing
else will really work.

Cool, agreed.

Question, this lookup happens only once at startup?

Correct.

And if nothing is set and we are using the embedded data dir, nothing is
logged, right?

Well eventually the end result of the data dir lookups is logged quite
obviously at INFO.

----------------------------------
- GEOSERVER_DATA_DIR: ....
----------------------------------

But the fact that we are falling back isn't logged, so mentioning that
could not hurt. So in the case none of the options work (for whatever
reason) and we have to fallback we could add a logging statement here as
well:

https://github.com/geoserver/geoserver/blob/master/src/platform/src/main/java/org/geoserver/platform/GeoServerResourceLoader.java#L631

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

--
*Justin Deoliveira*
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive <https://twitter.com/j_deolive&gt;

On Wed, Mar 19, 2014 at 6:07 PM, Justin Deoliveira <
jdeolive@anonymised.com> wrote:

On Wed, Mar 19, 2014 at 11:01 AM, Andrea Aime <
andrea.aime@anonymised.com> wrote:

On Wed, Mar 19, 2014 at 5:49 PM, Justin Deoliveira <
jdeolive@anonymised.com> wrote:

Currently if the user specified data directory can not be read, either
for permissions reasons, or the directory does not exist because of a
mistype, etc... the condition is logged at the FINE level.

Recently we had a client mention that this wasn't obvious and I tend to
agree. Any objections to upping it to either INFO or even WARNING? The code
in question lives here:

https://github.com/geoserver/geoserver/blob/master/src/platform/src/main/java/org/geoserver/platform/GeoServerResourceLoader.java#L611

If no objection any preference to INFO or WARNING? I am thinking WARNING.

Agreed it should be higher up. Warning seems like a better choice, as
from there, we have a good chance nothing
else will really work.

Cool, agreed.

Question, this lookup happens only once at startup?

Correct.

And if nothing is set and we are using the embedded data dir, nothing is
logged, right?

Well eventually the end result of the data dir lookups is logged quite
obviously at INFO.

----------------------------------
- GEOSERVER_DATA_DIR: ....
----------------------------------

But the fact that we are falling back isn't logged, so mentioning that
could not hurt. So in the case none of the options work (for whatever
reason) and we have to fallback we could add a logging statement here as
well:

https://github.com/geoserver/geoserver/blob/master/src/platform/src/main/java/org/geoserver/platform/GeoServerResourceLoader.java#L631

May not hurt to state "No external data dir found, using the one embedded
in the WAR file. For production usage please set an external one" at INFO
level

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------