IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Hibernate Java Discussion :

Hibernate verbose trop


Sujet :

Hibernate Java

  1. #1
    Membre chevronné Avatar de Mister Nono
    Homme Profil pro
    Ingénieur Mathématiques et Informatique
    Inscrit en
    Septembre 2002
    Messages
    2 232
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Ingénieur Mathématiques et Informatique
    Secteur : Santé

    Informations forums :
    Inscription : Septembre 2002
    Messages : 2 232
    Points : 1 898
    Points
    1 898
    Par défaut Hibernate verbose trop
    Bonjour,

    Comment faire pour ne plus afficher (ou rediriger) les logs de hibernate comme par exemple ceux-ci :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
     
    avr. 09, 2013 11:04:38 AM org.hibernate.annotations.common.Version <clinit>
    INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
    avr. 09, 2013 11:04:38 AM org.hibernate.Version logVersion
    INFO: HHH000412: Hibernate Core {4.1.10.Final}
    avr. 09, 2013 11:04:38 AM org.hibernate.cfg.Environment <clinit>
    INFO: HHH000206: hibernate.properties not found
    avr. 09, 2013 11:04:38 AM org.hibernate.cfg.Environment buildBytecodeProvider
    INFO: HHH000021: Bytecode provider name : javassist
    avr. 09, 2013 11:04:38 AM org.hibernate.cfg.Configuration configure
    INFO: HHH000043: Configuring from resource: hibernate.cfg.xml
    avr. 09, 2013 11:04:38 AM org.hibernate.cfg.Configuration getConfigurationInputStream
    INFO: HHH000040: Configuration resource: hibernate.cfg.xml
    avr. 09, 2013 11:04:38 AM org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
    WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
    avr. 09, 2013 11:04:38 AM org.hibernate.cfg.Configuration doConfigure
    INFO: HHH000041: Configured SessionFactory: null
    avr. 09, 2013 11:04:38 AM org.hibernate.cfg.Configuration configure
    INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
    avr. 09, 2013 11:04:38 AM org.hibernate.cfg.Configuration getConfigurationInputStream
    INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
    avr. 09, 2013 11:04:38 AM org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
    WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
    avr. 09, 2013 11:04:38 AM org.hibernate.cfg.Configuration doConfigure
    INFO: HHH000041: Configured SessionFactory: null
    avr. 09, 2013 11:04:39 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
    INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
    avr. 09, 2013 11:04:39 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
    INFO: HHH000115: Hibernate connection pool size: 10
    avr. 09, 2013 11:04:39 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
    INFO: HHH000006: Autocommit mode: false
    avr. 09, 2013 11:04:39 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
    INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/plansoins]
    avr. 09, 2013 11:04:39 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
     
    ... blabla ...
     
    org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
    INFO: HHH000397: Using ASTQueryTranslatorFactory
    avr. 09, 2013 11:04:40 AM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
    INFO: HHH000228: Running hbm2ddl schema update
    avr. 09, 2013 11:04:40 AM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
    INFO: HHH000102: Fetching database metadata
     
    ... blabla...
    ... qui s'affichent dans la console ?

    Merci.

    A+
    La connaissance ne sert que si elle est partagée.
    http://ms2i.net

  2. #2
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2008
    Messages
    394
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2008
    Messages : 394
    Points : 639
    Points
    639
    Par défaut
    Bonjour,

    Est-ce que tu utilises log4j sur ton projet ? Si oui complètes ton fichier log4j.xml avec :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    <logger name="org.hibernate">
      <level value="warn"/> <!-- ou error si tu préfères -->
    </logger>
    Oui si tu utilises un fichier log4j.properties :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    log4j.logger.org.hibernate=warn
    Romain.

  3. #3
    Membre chevronné Avatar de Mister Nono
    Homme Profil pro
    Ingénieur Mathématiques et Informatique
    Inscrit en
    Septembre 2002
    Messages
    2 232
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Ingénieur Mathématiques et Informatique
    Secteur : Santé

    Informations forums :
    Inscription : Septembre 2002
    Messages : 2 232
    Points : 1 898
    Points
    1 898
    Par défaut
    Citation Envoyé par rg77140 Voir le message
    Bonjour,

    Est-ce que tu utilises log4j sur ton projet ? Si oui complètes ton fichier log4j.xml avec :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    <logger name="org.hibernate">
      <level value="warn"/> <!-- ou error si tu préfères -->
    </logger>
    Oui si tu utilises un fichier log4j.properties :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    log4j.logger.org.hibernate=warn
    Romain.
    Merci pour ta réponse : j'avais confondu warn et debug.

    +1

    A+
    La connaissance ne sert que si elle est partagée.
    http://ms2i.net

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [TComboBox] Contenu trop long pour la zone d'affichage
    Par bebeours dans le forum C++Builder
    Réponses: 2
    Dernier message: 15/09/2003, 16h21
  2. chaine trop longue pour envoyer en socket?
    Par jeje.r dans le forum C++Builder
    Réponses: 10
    Dernier message: 27/06/2003, 16h36
  3. Surface trop grande
    Par Black_Daimond dans le forum DirectX
    Réponses: 1
    Dernier message: 18/01/2003, 03h02
  4. Arrêter un prog si temps de connexion trop long
    Par jakouz dans le forum Langage
    Réponses: 4
    Dernier message: 22/10/2002, 18h28

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo