From a2262103fb749b570c4096b43ee107ad7143c04e Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 8 Nov 2016 15:53:47 +0530 Subject: Implement mlog.warning and use it everywhere for warnings Prepends the string with 'WARNING:' in ANSI yellow. Closes https://github.com/mesonbuild/meson/issues/961 --- mesonbuild/backend/backends.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/backend/backends.py') diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index a4f2b51..bd75fdb 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -81,8 +81,8 @@ class Backend(): def get_target_filename(self, t): if isinstance(t, build.CustomTarget): if len(t.get_outputs()) != 1: - mlog.log(mlog.red('WARNING'), 'custom_target {!r} has more ' \ - 'than one output! Using the first one.'.format(t.name)) + mlog.warning('custom_target {!r} has more than one output! ' \ + 'Using the first one.'.format(t.name)) filename = t.get_outputs()[0] else: assert(isinstance(t, build.BuildTarget)) -- cgit v1.1