// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include<alias/log.h>#include<stdarg.h>#include<stdio.h>#include<string.h>voidalias_log(enum alias_log_level level,constchar*file,uint32_tline,constchar*format,...){constchar* last_slash =strrchr(file,'/');if(last_slash !=NULL){
file = last_slash +1;}printf("%c%s%4i - ",(char[]){'E','W','I','D','T'}[level], file, line);
va_list ap;va_start(ap, format);vprintf(format, ap);va_end(ap);puts("");}