-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
223880
committed
Jun 29, 2024
1 parent
f9fbc02
commit 6cbbb37
Showing
1 changed file
with
23 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,38 @@ | ||
extern crate lightning; | ||
extern crate dlc; | ||
extern crate nostr; | ||
extern crate log; | ||
extern crate env_logger; | ||
|
||
use lightning::{ln::peer_channel::ChannelDetails, util::logger::Logger}; | ||
use dlc::{contract::Contract, payout_curve::PayoutCurve}; | ||
use nostr::{self, NodeClient}; | ||
use lightning::{util::logger::Logger as LightningLogger}; // Renamed to avoid conflict | ||
use dlc::{Contract, PayoutCurve}; // Assuming these are directly available | ||
use nostr::NodeClient; | ||
use log::info; | ||
|
||
use crate::lightning_lending::{ | ||
bitcoin::Bitcoin, | ||
nostr::Nostr, | ||
dlc::Dlc, | ||
lightning::Lightning, | ||
}; | ||
struct AppLogger; | ||
|
||
struct Logger; | ||
|
||
impl Logger { | ||
impl AppLogger { | ||
fn new() -> Self { | ||
Logger | ||
AppLogger | ||
} | ||
} | ||
fn main() { | ||
|
||
fn main() { | ||
env_logger::init(); | ||
|
||
env_logger::init(); | ||
info!("Logger initialized"); | ||
|
||
info!("Logger initialized"); | ||
|
||
// Assuming these `new` methods exist and accept a logger | ||
let lightning = Lightning::new(&logger); | ||
let bitcoin = Bitcoin::new(&logger); | ||
let dlc = Dlc::new(&logger); | ||
let nostr = Nostr::new(&logger); | ||
let contract = Contract::new(&logger); | ||
let payout_curve = PayoutCurve::new(&logger); | ||
let node_client = NodeClient::new(&logger); | ||
let logger = AppLogger::new(); | ||
// Use logger with your specific implementation | ||
// Assuming new methods accept a reference to AppLogger | ||
|
||
let lightning = Lightning::new(&logger); | ||
let bitcoin = Bitcoin::new(&logger); | ||
let dlc = Dlc::new(&logger); | ||
let nostr = Nostr::new(&logger); | ||
let contract = Contract::new(&logger); | ||
let payout_curve = PayoutCurve::new(&logger); | ||
let node_client = NodeClient::new(&logger); | ||
} | ||
|
||
|