Giter Site home page Giter Site logo

Comments (6)

galderz avatar galderz commented on May 14, 2024

This is on Play 2.1.0.

from playframework.

galderz avatar galderz commented on May 14, 2024

A workaround for situations where the Play libraries and the web application reside in different classloaders is to use -Dlogger.file= system property, but this is less than ideal.

from playframework.

huntc avatar huntc commented on May 14, 2024

Thanks for the comment. Are you referring to incorrect documentation on our part or an issue within our code?

from playframework.

galderz avatar galderz commented on May 14, 2024

Code of course:
https://github.com/playframework/Play20/blob/master/framework/src/play/src/main/scala/play/api/Logger.scala#L24

Application trait comes with a potential custom classloader as parameter, if present, that application classloader should be used for anything the Play server needs to do where it needs a classloader, i.e. loading a class, loading a resource...etc.

from playframework.

jroper avatar jroper commented on May 14, 2024

This is not as simple as it sounds, since in dev mode (where using the right classloader matters), the logger is used and initialised before the application or its classloader even exists. Then, on each reload, the logger is reinitialised, but I think this is during the initialisation of the application, which means its not safe to use the application at that point to access the classloader. We'll need to look carefully at the init code in Play. Possibly we should be passing a classloader to the init and then configure methods, and hopefully the place from which we call those has access to the right classloader to use.

from playframework.

jroper avatar jroper commented on May 14, 2024

Fixed in #1448.

from playframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.