class PrintyPrintyBangBang

Introduction

PrintyPrintyBangBang is a funny little class designed to do two things:

Use

A typical mrSCPI application will not directly use PrintyPrintyBangBang instead depending on a SCPIsession instance to manage the global PrintyPrintyBangBang instance. For example, while PrintyPrintyBangBang maintains a list of global options and a PrintyPrintyBangBang#set method, most mrSCPI applications will use the SCPIsession#set in the SCPIsession class – which will forward the appropriate options to the global PrintyPrintyBangBang instance. That said, it is perfectly acceptable to use PrintyPrintyBangBang directly – if you wish to log something outside of the SCPIsession for example.

PrintyPrintyBangBang is a Singleton. The normal way to use it is as follows

PrintyPrintyBangBang.instance.logPrinter(1, "ERROR: :url was malformed: #{urlString.inspect}", self, 70)

Note that when PrintyPrintyBangBang is made aware of a new output file, it will open that file and keep it open until close is called or another file is specified. Output files are specified by strings – not file handles!