rem: char acpi_err_string[512]; int debug_fd = open("/boot/acpi_log",O_WRONLY | O_APPEND | O_CREAT); vsprintf(acpi_err_string, Fmt, Args); write(debug_fd,acpi_err_string,strlen(acpi_err_string)); write(debug_fd,"\n",1); close(debug_fd);
context: AcpiOsVprintf (    const char              *Fmt,    va_list                 Args){#ifndef _KERNEL_MODE    INT32                   Count = 0;    UINT8                   Flags;    Flags = AcpiGbl_DbOutputFlags;    if (Flags & ACPI_DB_REDIRECTABLE_OUTPUT)    {        /* Output is directable to either a file (if open) or the console */        if (AcpiGbl_DebugFile)        {            /* Output file is open, send the output there */            Count = vfprintf (AcpiGbl_DebugFile, Fmt, Args);        }        else        {            /* No redirection, send output to console (once only!) */            Flags |= ACPI_DB_CONSOLE_OUTPUT;        }    }    if (Flags & ACPI_DB_CONSOLE_OUTPUT)    {        Count = vfprintf (AcpiGbl_OutputFile, Fmt, Args);    }#else	char acpi_err_string[512];	int debug_fd = open("/boot/acpi_log",O_WRONLY | O_APPEND | O_CREAT);	vsprintf(acpi_err_string, Fmt, Args);	write(debug_fd,acpi_err_string,strlen(acpi_err_string));	write(debug_fd,"\n",1);	close(debug_fd);	//kernel_debugger(acpi_err_string);#endif    return;}