Merge "base: support logging before enter main function." am: a59c7bcc48
am: 14e66c5989

Change-Id: I736348033faeaba5ce88f1e513fbd879222028aa