// ĠCopyright Ġ 2 0 0 0 - 2 0 1 8 ĠJetBrains Ġs . r . o . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ package Ġcom . intellij . internal . statistic . event Log Ċ Ċ import Ġcom . intellij . openapi . diagnostic . Logger Ċ Ċ import Ġcom . intellij . openapi . extensions . Extension Point Name Ċ import Ġcom . intellij . openapi . extensions . Extensions Ċ import Ġjava . io . File Ċ import Ġjava . util .* Ċ Ċ private Ġval ĠLOG Ġ= ĠLogger . getInstance ("# com . intellij . internal . statistic . event Log . Feature Usage Event Logger ") Ċ private Ġval ĠEP _ NAME Ġ= ĠExtension Point Name . create < Feature Usage Event Logger Provider >(" com . intellij . statistic . event Log . f us Event Logger Provider ") Ċ Ċ interface ĠFeature Usage Event Logger Ġ{ ĊĊĠ Ġfun Ġlog ( recorder Id : ĠString , Ġaction : ĠString , Ġis State : ĠBoolean ) ĊĊĠ Ġfun Ġlog ( recorder Id : ĠString , Ġaction : ĠString , Ġdata : ĠMap < String , ĠAny >, Ġis State : ĠBoolean ) ĊĊĠ Ġfun Ġget Log Files (): ĠList < File > Ċ Ċ } Ċ Ċ interface ĠFeature Usage Event Logger Provider Ġ{ ĊĠ Ġfun Ġis Enabled () Ġ: ĠBoolean ĊĊĠ Ġfun Ġcreate Logger () Ġ: ĠFeature Usage Event Logger Ċ } Ċ Ċ class ĠFeature Usage Empty Event Logger Provider Ġ: ĠFeature Usage Event Logger Provider Ġ{ ĊĊĠ Ġoverride Ġfun Ġis Enabled () Ġ: ĠBoolean Ġ{ ĊĠĠĠ Ġreturn Ġfalse ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġcreate Logger () Ġ: ĠFeature Usage Event Logger Ġ{ ĊĠĠĠ Ġreturn ĠFeature Usage Empty Event Logger () ĊĠ Ġ} Ċ } Ċ Ċ class ĠFeature Usage Empty Event Logger Ġ: ĠFeature Usage Event Logger Ġ{ ĊĊĠ Ġoverride Ġfun Ġlog ( recorder Id : ĠString , Ġaction : ĠString , Ġis State : ĠBoolean ) Ġ{ ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġlog ( recorder Id : ĠString , Ġaction : ĠString , Ġdata : ĠMap < String , ĠAny >, Ġis State : ĠBoolean ) Ġ{ ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġget Log Files (): ĠList < File > Ġ{ ĊĠĠĠ Ġreturn Ġempty List () ĊĠ Ġ} Ċ } Ċ Ċ fun Ġget Logger Provider (): ĠFeature Usage Event Logger Provider Ġ{ ĊĠ Ġif Ġ( Extensions . getRoot Area (). has Extension Point ( EP _ NAME . name )) Ġ{ ĊĠĠĠ Ġval Ġextensions Ġ= ĠEP _ NAME . extensions ĊĠĠĠ Ġif Ġ( extensions . isEmpty ()) Ġ{ ĊĠĠĠĠĠ ĠLOG . warn (" Cannot Ġfind Ġfeature Ġusage Ġevent Ġlogger ") ĊĠĠĠ Ġ} ĊĠĠĠ Ġelse Ġif Ġ( extensions . size Ġ> Ġ 1 ) Ġ{ ĊĠĠĠĠĠ ĠLOG . warn (" Too Ġmany Ġfeature Ġusage Ġlog gers Ġregistered Ġ(" Ġ+ ĠArrays . asList < Feature Usage Event Logger Provider >(* extensions ) Ġ+ Ġ") ") ĊĠĠĠ Ġ} ĊĠĠĠ Ġreturn Ġextensions [ 0 ] ĊĠ Ġ} ĊĠ Ġreturn ĠFeature Usage Empty Event Logger Provider () Ċ }