Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1016255 // localPrint - print to program's own log only (and to System.out)

JavaX fragment (include)

1  
please include function print.
2  
3  
static void localPrint() { localPrint(""); }
4  
static <A> A localPrint(S s, A o) { localPrint(s + o); ret o; }
5  
6  
// returns original object
7  
static <A> A localPrint(A o) {
8  
  ping();
9  
  if (print_silent) ret o;
10  
  S s = S.valueOf(o) + "\n";
11  
  localPrint_raw(s);
12  
  ret o;
13  
}
14  
15  
static void localPrint_raw(String s) {
16  
  s = fixNewLines(s);
17  
  StringBuffer loc = local_log;
18  
  if (loc != null) 
19  
    print_append(loc, s, local_log_max);
20  
  System.out.print(s);
21  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016255
Snippet name: localPrint - print to program's own log only (and to System.out)
Eternal ID of this version: #1016255/2
Text MD5: 26d7c2ce2eefded3d29c0f42d340ff06
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-12 15:04:57
Source code size: 497 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 308 / 334
Version history: 1 change(s)
Referenced in: [show references]