prefix logs with rz:
This commit is contained in:
parent
1f8cbda73f
commit
6678176326
|
@ -9,6 +9,7 @@ describe('Run', () => {
|
|||
httpEnable: true,
|
||||
requestBindPort: 5001,
|
||||
publishBindPort: 5002,
|
||||
peerId: 'app-001',
|
||||
});
|
||||
await app.start();
|
||||
});
|
||||
|
|
|
@ -8,11 +8,11 @@ describe('Run', () => {
|
|||
beforeAll(async () => {
|
||||
apps[0] = new App({
|
||||
httpEnable: true,
|
||||
peerId: 'app0',
|
||||
peerId: 'app-002-A',
|
||||
});
|
||||
apps[1] = new App({
|
||||
httpEnable: true,
|
||||
peerId: 'app1',
|
||||
peerId: 'app-002-B',
|
||||
// Make the apps use the same pubsub topic so they can talk to each other
|
||||
pubSubTopic: apps[0].config.pubSubTopic,
|
||||
});
|
||||
|
|
|
@ -11,7 +11,7 @@ import {Entity, EntityProperties} from "./entity.js";
|
|||
import {Lossy, ResolvedViewOne, Resolver} from "./lossy.js";
|
||||
import {RhizomeNode} from "./node.js";
|
||||
import {DomainEntityID} from "./types.js";
|
||||
const debug = Debug('collection');
|
||||
const debug = Debug('rz:collection');
|
||||
|
||||
export class Collection {
|
||||
rhizomeNode?: RhizomeNode;
|
||||
|
|
|
@ -3,7 +3,7 @@ import EventEmitter from 'node:events';
|
|||
import objectHash from 'object-hash';
|
||||
import {Delta, DeltaNetworkImage} from './delta.js';
|
||||
import {RhizomeNode} from './node.js';
|
||||
const debug = Debug('deltas');
|
||||
const debug = Debug('rz:deltas');
|
||||
|
||||
enum Decision {
|
||||
Accept,
|
||||
|
|
|
@ -4,7 +4,7 @@ import {Server} from "http";
|
|||
import {RhizomeNode} from "../node.js";
|
||||
import {HttpApi} from "./api.js";
|
||||
import {HttpHtml} from "./html.js";
|
||||
const debug = Debug('http-api');
|
||||
const debug = Debug('rz:http-api');
|
||||
|
||||
export class HttpServer {
|
||||
app = express();
|
||||
|
|
|
@ -7,7 +7,7 @@ import {Delta, DeltaFilter, DeltaNetworkImage} from './delta.js';
|
|||
import {Transactions} from './transactions.js';
|
||||
import {DomainEntityID, PropertyID, PropertyTypes, TransactionID, ViewMany} from "./types.js";
|
||||
import {RhizomeNode} from './node.js';
|
||||
const debug = Debug('lossless');
|
||||
const debug = Debug('rz:lossless');
|
||||
|
||||
export type CollapsedPointer = {[key: PropertyID]: PropertyTypes};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import {DeltaFilter} from "./delta.js";
|
||||
import {CollapsedDelta, Lossless, LosslessViewMany, LosslessViewOne} from "./lossless.js";
|
||||
import {DomainEntityID, PropertyID, PropertyTypes, Timestamp, ViewMany} from "./types.js";
|
||||
// const debug = Debug('lossy');
|
||||
// const debug = Debug('rz:lossy');
|
||||
|
||||
type TimestampedProperty = {
|
||||
value: PropertyTypes,
|
||||
|
|
|
@ -7,7 +7,7 @@ import {Peers} from './peers.js';
|
|||
import {PubSub} from './pub-sub.js';
|
||||
import {RequestReply} from './request-reply.js';
|
||||
import {PeerAddress} from './types.js';
|
||||
const debug = Debug('rhizome-node');
|
||||
const debug = Debug('rz:rhizome-node');
|
||||
|
||||
export type RhizomeNodeConfig = {
|
||||
requestBindAddr: string;
|
||||
|
|
|
@ -6,7 +6,7 @@ import {RhizomeNode} from "./node.js";
|
|||
import {Subscription} from './pub-sub.js';
|
||||
import {PeerRequest, RequestSocket, ResponseSocket} from "./request-reply.js";
|
||||
import {PeerAddress} from "./types.js";
|
||||
const debug = Debug('peers');
|
||||
const debug = Debug('rz:peers');
|
||||
|
||||
export enum RequestMethods {
|
||||
GetPublishAddress,
|
||||
|
|
|
@ -10,7 +10,7 @@ import {Libp2p, createLibp2p} from 'libp2p';
|
|||
import {Publisher, Subscriber} from 'zeromq';
|
||||
import {RhizomeNode} from './node.js';
|
||||
import {PeerAddress} from './types.js';
|
||||
const debug = Debug('pub-sub');
|
||||
const debug = Debug('rz:pub-sub');
|
||||
|
||||
export type SubscribedMessageHandler = (sender: PeerAddress, msg: string) => void;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import {Message, Reply, Request} from 'zeromq';
|
|||
import {RhizomeNode} from './node.js';
|
||||
import {RequestMethods} from './peers.js';
|
||||
import {PeerAddress} from './types.js';
|
||||
const debug = Debug('request-reply');
|
||||
const debug = Debug('rz:request-reply');
|
||||
|
||||
export type PeerRequest = {
|
||||
method: RequestMethods;
|
||||
|
|
|
@ -3,7 +3,7 @@ import EventEmitter from "events";
|
|||
import {Delta, DeltaID} from "./delta.js";
|
||||
import {DomainEntityID, TransactionID} from "./types.js";
|
||||
import {Lossless} from "./lossless.js";
|
||||
const debug = Debug("transactions");
|
||||
const debug = Debug('rz:transactions');
|
||||
|
||||
function getDeltaTransactionId(delta: Delta): TransactionID | undefined {
|
||||
const {target: transactionId} = delta.pointers.find(({
|
||||
|
|
|
@ -4,7 +4,7 @@ import path, {join} from "path";
|
|||
import showdown from "showdown";
|
||||
import {RhizomeNode} from "../node.js";
|
||||
const {Converter} = showdown;
|
||||
const debug = Debug('md-files');
|
||||
const debug = Debug('rz:md-files');
|
||||
|
||||
const docConverter = new Converter({
|
||||
completeHTMLDocument: true,
|
||||
|
|
Loading…
Reference in New Issue