{"action":"created","issue":{"url":"https://api.github.com/repos/GELOG/adam-ibs/issues/39","labels_url":"https://api.github.com/repos/GELOG/adam-ibs/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/GELOG/adam-ibs/issues/39/comments","events_url":"https://api.github.com/repos/GELOG/adam-ibs/issues/39/events","html_url":"https://github.com/GELOG/adam-ibs/issues/39","id":87027578,"number":39,"title":"Logging processing","user":{"login":"ikizema","id":10617581,"avatar_url":"https://avatars.githubusercontent.com/u/10617581?v=3","gravatar_id":"","url":"https://api.github.com/users/ikizema","html_url":"https://github.com/ikizema","followers_url":"https://api.github.com/users/ikizema/followers","following_url":"https://api.github.com/users/ikizema/following{/other_user}","gists_url":"https://api.github.com/users/ikizema/gists{/gist_id}","starred_url":"https://api.github.com/users/ikizema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikizema/subscriptions","organizations_url":"https://api.github.com/users/ikizema/orgs","repos_url":"https://api.github.com/users/ikizema/repos","events_url":"https://api.github.com/users/ikizema/events{/privacy}","received_events_url":"https://api.github.com/users/ikizema/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"karim73","id":1256400,"avatar_url":"https://avatars.githubusercontent.com/u/1256400?v=3","gravatar_id":"","url":"https://api.github.com/users/karim73","html_url":"https://github.com/karim73","followers_url":"https://api.github.com/users/karim73/followers","following_url":"https://api.github.com/users/karim73/following{/other_user}","gists_url":"https://api.github.com/users/karim73/gists{/gist_id}","starred_url":"https://api.github.com/users/karim73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karim73/subscriptions","organizations_url":"https://api.github.com/users/karim73/orgs","repos_url":"https://api.github.com/users/karim73/repos","events_url":"https://api.github.com/users/karim73/events{/privacy}","received_events_url":"https://api.github.com/users/karim73/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2015-06-10T16:28:26Z","updated_at":"2015-07-15T13:32:57Z","closed_at":null,"body":"On the same way as plink does, we need to log the program execution.\n - 1. Find an easy way to log the program execution.\n - 2. Implement it.\n\nI have created a WriteLog scala class which I call any time I would like to write a log.  For now, it does only \"println\".  A logging to file functionality needs to be implemented."},"comment":{"url":"https://api.github.com/repos/GELOG/adam-ibs/issues/comments/121618286","html_url":"https://github.com/GELOG/adam-ibs/issues/39#issuecomment-121618286","issue_url":"https://api.github.com/repos/GELOG/adam-ibs/issues/39","id":121618286,"user":{"login":"karim73","id":1256400,"avatar_url":"https://avatars.githubusercontent.com/u/1256400?v=3","gravatar_id":"","url":"https://api.github.com/users/karim73","html_url":"https://github.com/karim73","followers_url":"https://api.github.com/users/karim73/followers","following_url":"https://api.github.com/users/karim73/following{/other_user}","gists_url":"https://api.github.com/users/karim73/gists{/gist_id}","starred_url":"https://api.github.com/users/karim73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karim73/subscriptions","organizations_url":"https://api.github.com/users/karim73/orgs","repos_url":"https://api.github.com/users/karim73/repos","events_url":"https://api.github.com/users/karim73/events{/privacy}","received_events_url":"https://api.github.com/users/karim73/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T13:32:56Z","updated_at":"2015-07-15T13:32:56Z","body":"Utilisation de logback pour le logging.\nPackages a inclure : logback-core et logback-classis. Il existe un troiseme package : logback-access qui s'integre avec les servlets (je l'ai pas retenu  pour le projet)\nle package slf4j est inclus dans logback-core.\n\nConfiguration speciale a faire :\n\nDans pom.xml :  exclure le package slf4j dans la declaration du package spark ( dù à un conflit de StaticLoggerBinder (slf4j de spark vs logback )\nAjout d'un fichier de config : src/main/resources/logback.xml\n- declaration des appenders : ici seule la console est utilisée, \n- J'ai desactivé tous les logs (specialement les logs generés par spark )\n- j'ai activé seulement les logs du package com.ets..mgl804, avec le niveau le plus bas : TRACE.\nlogger name=\"com.ets.mgl804\" level=\"TRACE\" /\n\nUtilisation :\ndans chaque class où on souhaite loguer : \n- import le package  : import org.slf4j.{LoggerFactory, Logger}\n- declarer une instance du logger :\ndef logb = LoggerFactory.getLogger(this.getClass())\n(le parametre this.getClass() peut etre remplacé par un autre nom )\n- loguer : \nlogb.info(\"hellow worl \")\nLes differetns level sont (dans l'ordre ) : trace, debug, info, warn, error\n-  Pour diminiuer la verbositié, on a juste a modifier le level dans logback.xml.\nExemple, si le level par defaut est setté a WARN, alors tous les logs de type : info, trace, debug ne seront pas affiché. \nC'est au developpeur de choisir (selon contexte) quelle methode(level) a utiliser  ( log.info() ou log.debug() ect ..)\n\n- logback a introduit un optimisateur :\non peut loguer une expression avec parametre de deux manieres :\nlog.info(\"hello \"+ str )\nou\nlog.info(\"hello {}\" , str )\nDans le premier cas, l'expression sera systematiquement evaluée\nDans le deuxieme cas, l'expression ne sera evalué que si le level est superieur au level par defaut ( log.info(\"helllo {}\" , str ) ne sera pas evalué si le level par defaut est WARN )."}}