How to use the loglevelnext.log function in loglevelnext

To help you get started, we’ve selected a few loglevelnext examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dcmjs-org / dcmjs / src / bitArray.js View on Github external
function pack(pixelData) {
    const numPixels = pixelData.length;

    log.log("numPixels: " + numPixels);

    const length = getBytesForBinaryFrame(numPixels);
    //log.log('getBytesForBinaryFrame: ' + length);

    const bitPixelData = new Uint8Array(length);

    let bytePos = 0;

    for (let i = 0; i < numPixels; i++) {
        // Compute byte position
        bytePos = Math.floor(i / 8);

        const pixValue = pixelData[i] !== 0;

        //log.log('i: ' + i);
        //log.log('pixValue: ' + pixValue);
github dcmjs-org / dcmjs / src / ValueRepresentation.js View on Github external
valid = checkValue.length <= check;
                displaylen = checkValue.length;
                isString = true;
            } else if (this.maxLength) {
                valid = checklen <= this.maxLength;
            }

            var errmsg =
                "Value exceeds max length, vr: " +
                this.type +
                ", value: " +
                checkValue +
                ", length: " +
                displaylen;
            if (!valid) {
                if (isString) log.log(errmsg);
                else throw new Error(errmsg);
            }
            total += checklen;
        }
        if (this.allowMultiple()) {
            total += valarr.length ? valarr.length - 1 : 0;
        }

        //check for odd
        var written = total;
        if (total & 1) {
            stream.writeHex(this.padByte);
            written++;
        }
        return written;
    }
github dcmjs-org / dcmjs / src / dicomweb.js View on Github external
responses.forEach(patient => {
                log.log(patient);
            });
        });
github dcmjs-org / dcmjs / src / anonymizer.js View on Github external
tagNamesToEmpty.forEach(function(tag) {
        var tagInfo = DicomMetaDictionary.nameMap[tag];
        if (tagInfo && tagInfo.version != "PrivateTag") {
            var tagNumber = tagInfo.tag,
                tagString = Tag.fromPString(tagNumber).toCleanString();
            if (dict[tagString]) {
                log.log("empty tag " + tag);
                var newValue;
                if (tagString == "00100010") {
                    newValue = ["ANON^PATIENT"];
                } else if (tagString == "00100020") {
                    newValue = ["ANONID"];
                } else {
                    newValue = [];
                }
                dict[tagString].Value = newValue;
            }
        }
    });
}

loglevelnext

A modern logging library for Node.js and modern browsers that provides log level mapping to the console

MPL-2.0
Latest version published 1 year ago

Package Health Score

56 / 100
Full package analysis