Bug 110313 - [EFL] Use EINA_LOG instead of fprintf
Summary: [EFL] Use EINA_LOG instead of fprintf
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-20 00:25 PST by Gyuyoung Kim
Modified: 2013-02-22 20:15 PST (History)
4 users (show)

See Also:


Attachments
Patch (6.26 KB, patch)
2013-02-20 00:28 PST, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (6.29 KB, patch)
2013-02-20 18:01 PST, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2013-02-20 00:25:15 PST
EFL port has used EINA_LOG_XXX to display error message. However, some EFL files use fprintf instead of EINA_LOG macro. 

FYI, we can see EINA_LOG message as below method,

1. export EINA_LOG_LEVEL=level value(e.g. Set 3)

  EINA_LOG_LEVEL_CRITICAL = 0
  EINA_LOG_LEVEL_ERR = 1
  EINA_LOG_LEVEL_WARN = 2	
  EINA_LOG_LEVEL_INFO = 3
  EINA_LOG_LEVEL_DBG = 4

2. Run MiniBrowser.
Comment 1 Gyuyoung Kim 2013-02-20 00:28:05 PST
Created attachment 189261 [details]
Patch
Comment 2 Gyuyoung Kim 2013-02-20 18:01:11 PST
Created attachment 189432 [details]
Patch
Comment 3 Laszlo Gombos 2013-02-20 18:52:00 PST
What do you think about using the WebKit logging macros (e.g. LOG_ERROR) consistently instead - the same way it as it is in some parts of WebContextEfl.cpp ?
Comment 4 Gyuyoung Kim 2013-02-20 19:06:07 PST
(In reply to comment #3)
> What do you think about using the WebKit logging macros (e.g. LOG_ERROR) consistently instead - the same way it as it is in some parts of WebContextEfl.cpp ?

Yes, EFL port can use LOG() macro. So, I don't mind to use LOG_ERROR(). If there is not objection to use LOG(), I'd like to change all EINA_LOG with LOG() macro. What do you think ?
Comment 5 Laszlo Gombos 2013-02-20 19:46:15 PST
(In reply to comment #4)
> (In reply to comment #3)
> > What do you think about using the WebKit logging macros (e.g. LOG_ERROR) consistently instead - the same way it as it is in some parts of WebContextEfl.cpp ?
> 
> Yes, EFL port can use LOG() macro. So, I don't mind to use LOG_ERROR(). If there is not objection to use LOG(), I'd like to change all EINA_LOG with LOG() macro. What do you think ?

I think in places where it is proper to include wtf we should prefer the WebKit LOG macros as it generate a consistent/combined log and helps later move the code around.
Comment 6 Gyuyoung Kim 2013-02-21 20:35:50 PST
Laszlo, as we talked on Bug 110452, LOG_DEBUG(or, similar things) may make unneeded logs when developer wanna see needed log. So, it looks there is no good alternative solution. So, I'd like to use EINA_LOG as is. Please take a look this patch again. (I don't wanna remove current log in this bug. It needs to investigate further.)
Comment 7 Laszlo Gombos 2013-02-22 05:14:09 PST
Comment on attachment 189432 [details]
Patch

r=me. Thanks for checking the alternatives.
Comment 8 WebKit Review Bot 2013-02-22 20:15:47 PST
Comment on attachment 189432 [details]
Patch

Clearing flags on attachment: 189432

Committed r143832: <http://trac.webkit.org/changeset/143832>
Comment 9 WebKit Review Bot 2013-02-22 20:15:51 PST
All reviewed patches have been landed.  Closing bug.