mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:12:45 +00:00 
			
		
		
		
	AK: Don't add newline for outf/dbgf/warnf.
In the future all (normal) output should be written by any of the
following functions:
    out    (currently called new_out)
    outln
    dbg    (currently called new_dbg)
    dbgln
    warn   (currently called new_warn)
    warnln
However, there are still a ton of uses of the old out/warn/dbg in the
code base so the new functions are called new_out/new_warn/new_dbg. I am
going to rename them as soon as all the other usages are gone (this
might take a while.)
I also added raw_out/raw_dbg/raw_warn which don't do any escaping,
this should be useful if no formatting is required and if the input
contains tons of curly braces. (I am not entirely sure if this function
will stay, but I am adding it for now.)
			
			
This commit is contained in:
		
							parent
							
								
									4237089a21
								
							
						
					
					
						commit
						d5ffb51a83
					
				
					 16 changed files with 202 additions and 96 deletions
				
			
		|  | @ -207,35 +207,13 @@ DebugLogStream klog(); | |||
| 
 | ||||
| void dump_bytes(ReadonlyBytes); | ||||
| 
 | ||||
| #ifndef KERNEL | ||||
| template<typename... Parameters> | ||||
| void outf(StringView fmtstr, const Parameters&... parameters) | ||||
| { | ||||
|     vformat(out(), fmtstr, VariadicFormatParams { parameters... }); | ||||
| } | ||||
| template<typename... Parameters> | ||||
| void warnf(StringView fmtstr, const Parameters&... parameters) | ||||
| { | ||||
|     vformat(warn(), fmtstr, VariadicFormatParams { parameters... }); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| template<typename... Parameters> | ||||
| void dbgf(StringView fmtstr, const Parameters&... parameters) | ||||
| { | ||||
|     vformat(dbg(), fmtstr, VariadicFormatParams { parameters... }); | ||||
| } | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| using AK::dbg; | ||||
| using AK::dbgf; | ||||
| using AK::klog; | ||||
| using AK::LogStream; | ||||
| 
 | ||||
| #if !defined(KERNEL) | ||||
| using AK::out; | ||||
| using AK::outf; | ||||
| using AK::warn; | ||||
| using AK::warnf; | ||||
| #endif | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 asynts
						asynts