[V1] framework/logger: fix bug of generate the log output path

Message ID 20220420070420.3574-1-junx.dong@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] framework/logger: fix bug of generate the log output path |

Commit Message

Jun Dong April 20, 2022, 7:04 a.m. UTC
  First, the log default path was generated based main script's directory. 
When modifying the standard project, we moved main script from framework 
sub directory to base directory, but no synchronous change the log patch 
generate rule. This patch fixed it.

Signed-off-by: Jun Dong <junx.dong@intel.com>
---
 framework/logger.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Tu, Lijuan April 20, 2022, 7:54 a.m. UTC | #1
On Wed, 20 Apr 2022 15:04:20 +0800, Jun Dong <junx.dong@intel.com> wrote:
> First, the log default path was generated based main script's directory. 
> When modifying the standard project, we moved main script from framework 
> sub directory to base directory, but no synchronous change the log patch 
> generate rule. This patch fixed it.
> 
> Signed-off-by: Jun Dong <junx.dong@intel.com>


Applied, thanks
  

Patch

diff --git a/framework/logger.py b/framework/logger.py
index 576a51dc..774ab9c4 100644
--- a/framework/logger.py
+++ b/framework/logger.py
@@ -194,7 +194,7 @@  class DTSLOG(BaseLoggerAdapter):
         self.debug_lvl = logging.DEBUG
 
         if log_dir is None:
-            self.log_path = os.getcwd() + "/../" + FOLDERS["Output"]
+            self.log_path = os.getcwd() + "/" + FOLDERS["Output"]
         else:
             self.log_path = (
                 log_dir  # log dir should contain tag/crb global value and mod in dts